2024-03-22 15:10:04 +00:00
|
|
|
on: [push]
|
|
|
|
jobs:
|
|
|
|
job:
|
|
|
|
runs-on: docker
|
|
|
|
container:
|
|
|
|
image: debian:bookworm
|
|
|
|
steps:
|
2024-03-22 22:15:17 +00:00
|
|
|
- name: Clone CD
|
2024-03-22 15:10:04 +00:00
|
|
|
run: |
|
|
|
|
echo '${{vars.dns}}' > '/etc/resolv.conf'
|
2024-03-22 22:15:17 +00:00
|
|
|
apt-get update
|
|
|
|
apt-get install --yes 'git'
|
|
|
|
git clone "${GITHUB_SERVER_URL}/rwx.work/cd"
|
2024-03-22 15:10:04 +00:00
|
|
|
|
2024-03-22 22:15:17 +00:00
|
|
|
- run: 'cd/env'
|
2024-03-22 15:10:04 +00:00
|
|
|
|
|
|
|
- name: Install tools
|
|
|
|
run: |
|
2024-03-22 22:15:17 +00:00
|
|
|
apt-get install --yes \
|
2024-03-22 15:10:04 +00:00
|
|
|
'tree' \
|
2024-03-22 15:15:15 +00:00
|
|
|
'pandoc' \
|
2024-03-22 15:10:04 +00:00
|
|
|
'rsync' \
|
|
|
|
|
|
|
|
- name: Clone repository
|
|
|
|
run: git clone "${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}" '.'
|
|
|
|
|
|
|
|
- name: Browse workspace
|
|
|
|
run: tree -a "${GITHUB_WORKSPACE}"
|
|
|
|
|
|
|
|
- name: Build
|
|
|
|
run: './build.sh'
|
|
|
|
|
|
|
|
- name: Configure Delivery
|
|
|
|
run: |
|
|
|
|
mkdir --parents ~/.ssh
|
2024-03-22 15:29:48 +00:00
|
|
|
echo '${{secrets.cd}}' > ~/.ssh/id_ed25519
|
2024-03-22 15:10:04 +00:00
|
|
|
chmod 600 ~/.ssh/id_ed25519
|
|
|
|
sha256sum ~/.ssh/id_ed25519
|
|
|
|
|
|
|
|
- name: Test connection
|
2024-03-22 19:48:33 +00:00
|
|
|
run: |
|
2024-03-22 19:55:15 +00:00
|
|
|
ssh -o StrictHostKeyChecking=accept-new 'cd@de.tilde.link' \
|
2024-03-22 19:48:33 +00:00
|
|
|
-- hostname
|
2024-03-22 15:10:04 +00:00
|
|
|
|
|
|
|
- name: Synchronize output
|
|
|
|
run: |
|
|
|
|
rsync \
|
|
|
|
--archive \
|
|
|
|
--verbose \
|
2024-03-22 19:48:33 +00:00
|
|
|
'out/' \
|
2024-03-22 19:55:15 +00:00
|
|
|
"cd@de.tilde.link:/cd/${GITHUB_REF_NAME}/${GITHUB_REPOSITORY}/"
|