cosin-fahrplan/.forgejo/workflows/deploy.yml

27 lines
711 B
YAML
Raw Normal View History

2024-04-07 14:17:43 +02:00
---
on:
push:
branches:
- master
jobs:
deploy:
runs-on: ipv6
env:
SSH_KNOWN_HOSTS: ${{ secrets.SSH_KNOWN_HOSTS }}
SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }}
RSYNC_DEST: ${{ secrets.RSYNC_DEST }}
steps:
- uses: https://code.forgejo.org/actions/checkout@v4
- name: upload
run: |
2024-04-07 14:18:29 +02:00
apt update
2024-04-07 14:17:43 +02:00
apt-get install --yes --no-install-recommends rsync
echo "$SSH_KNOWN_HOSTS" > /ssh_known_hosts
echo "$SSH_PRIVATE_KEY" > /ssh_private_key
chmod 0600 /ssh_private_key
rsync -v --recursive --delete -e "ssh -oUserKnownHostsFile=/ssh_known_hosts -i /ssh_private_key" "schedules/" "$RSYNC_DEST"