git/.forgejo/workflows/main.yaml

55 lines
1.3 KiB
YAML
Raw Normal View History

2024-03-22 15:10:04 +00:00
on: [push]
jobs:
job:
runs-on: docker
container:
image: debian:bookworm
steps:
- name: Sort environment
run: env | sort
- name: List event
run: cat "${GITHUB_EVENT_PATH}"
- name: Set DNS
run: |
echo '${{vars.dns}}' > '/etc/resolv.conf'
cat '/etc/resolv.conf'
- name: Update catalog
run: apt-get update
- name: Install tools
run: |
apt-get install --assume-yes \
'git' \
'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
run: ssh -o StrictHostKeyChecking=accept-new 'cd@de.tilde.link' -- hostname
- name: Synchronize output
run: |
rsync \
--archive \
--verbose \
2024-03-22 16:03:13 +00:00
'out/' "cd@de.tilde.link:${GITHUB_REPOSITORY}/"