chaostreff.ch/.forgejo/workflows/upload.yml
s3lph afe98b5eae
Some checks failed
/ build (push) Failing after 7s
/ upload (push) Failing after 16s
feat: migrate from woodpecker to forgejo actions
2023-11-13 23:28:42 +01:00

26 lines
742 B
YAML

---
on:
push:
branches:
- main
jobs:
upload:
runs-on: docker
steps:
- uses: https://code.forgejo.org/actions/checkout@v3
- run: |
apt-get update
apt-get install --yes --no-install-recommends rsync openssh-client
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 }}"