26 lines
690 B
YAML
26 lines
690 B
YAML
|
---
|
||
|
|
||
|
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: |
|
||
|
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"
|
||
|
|