chaostreff.ch/.forgejo/workflows/upload.yml

27 lines
754 B
YAML
Raw Normal View History

---
on:
push:
branches:
- main
jobs:
upload:
runs-on: docker
steps:
- uses: https://code.forgejo.org/actions/checkout@v3
- run: |
apt-get update
2023-11-13 23:29:56 +01:00
apt-get install --yes --no-install-recommends rsync openssh-client python3-pip
pip3 install -r requirements.txt
./build.py
mkdir -p .ssh && chmod 0700 .ssh
cat > .ssh/id_ed25519 <<EOF
${{ secrets.SSH_PRIVATE_KEY }}
EOF
cat > .ssh/known_hosts <<EOF
${{ secrets.SSH_KNOWN_HOSTS }}
EOF
chmod 0600 ".ssh/id_ed25519"
rsync -v --recursive --delete -e "ssh -oUserKnownHostsFile=.ssh/known_hosts -i .ssh/id_ed25519" "out/" "${{ secrets.RSYNC_DEST }}"