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

30 lines
786 B
YAML
Raw Permalink Normal View History

---
on:
push:
branches:
2024-04-07 01:22:10 +02:00
- 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: test
run: |
apt-get update
apt-get install --yes --no-install-recommends make hugo rsync
make clean generate
- name: upload
run: |
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" "public/" "$RSYNC_DEST"