feat: add CI/CD to automatically deploy
Some checks failed
Deploy Website / build-and-deploy (push) Failing after 12s

This commit is contained in:
Andrew Rioux 2025-10-19 23:45:36 -04:00
parent 4430469cdc
commit 0e526907e9
Signed by: andrew.rioux
GPG Key ID: 9B8BAC47C17ABB94
2 changed files with 28 additions and 4 deletions

View File

@ -0,0 +1,27 @@
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: |
nix-build -A articles
- name: Deploy article HTML
run: |
cat - <<EOD > ssh-key
${{ secrets.DEPLOY_SSH_KEY }}
EOD
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: |
shred ssh-key

View File

@ -19,7 +19,4 @@ let
find . -name '*.org' -exec build-article {} \; find . -name '*.org' -exec build-article {} \;
''; '';
}; };
in { in { inherit build-article articles; }
inherit build-article articles;
default = articles;
}