29 lines
786 B
YAML
29 lines
786 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: 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"
|
|
|