website/.gitea/workflows/deploy.yaml
Andrew Rioux 91aa9af6ae
Some checks failed
Deploy Website / build-and-deploy (push) Failing after 2s
fix: use full path and check before shredding
2025-10-19 23:47:35 -04:00

28 lines
713 B
YAML

name: Deploy Website
on: [push]
jobs:
build-and-deploy:
runs-on: native
steps:
- name: Check out repository code
uses: actions/checkout@v4
- name: Build article code
run: |
/run/current-system/sw/bin/nix-build -A articles
- name: Deploy article HTML
run: |
cat - <<EOD > ssh-key
${{ secrets.DEPLOY_SSH_KEY }}
EOD
/run/current-system/sw/bin/nix-shell -p rsync openssh --run \
'rsync -avz -e "ssh -oStrictHostKeyChecking=accept-new -i ssh-key" result/* deploy@andrew.riouxs.co:/srv/site'
- name: Remove SSH key
if: always()
run: |
test -f ssh-key && shred ssh-key