2025-07-08 17:23:45 +01:00
|
|
|
name: Deploy Blog
|
|
|
|
|
on:
|
|
|
|
|
push:
|
|
|
|
|
branches: [main]
|
|
|
|
|
jobs:
|
|
|
|
|
deploy:
|
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
|
container: node:18
|
|
|
|
|
steps:
|
|
|
|
|
- uses: actions/checkout@v3
|
2025-07-10 14:46:58 +01:00
|
|
|
- run: npm install
|
|
|
|
|
- run: npm run build:posts
|
|
|
|
|
- run: npm run build
|
2025-11-16 18:28:19 +00:00
|
|
|
env:
|
|
|
|
|
VITE_EOLAS_API_URL: ${{ vars.EOLAS_API_ENDPOINT }}
|
|
|
|
|
VITE_EOLAS_API_KEY: ${{ secrets.EOLAS_API_KEY }}
|
2025-07-10 14:47:59 +01:00
|
|
|
- run: |
|
2025-10-06 19:11:30 +01:00
|
|
|
echo "${{ secrets.VPS_DEPLOY_USER_SSH_KEY }}" > /tmp/ssh_key
|
2025-07-08 17:23:45 +01:00
|
|
|
chmod 600 /tmp/ssh_key
|
2025-10-06 19:11:30 +01:00
|
|
|
ssh -i /tmp/ssh_key -o StrictHostKeyChecking=no ${{ vars.VPS_DEPLOY_USER }} "bash -c 'rm -rf /var/www/systemsobscure.blog/*'"
|
|
|
|
|
scp -i /tmp/ssh_key -o StrictHostKeyChecking=no -r dist/* ${{ vars.VPS_DEPLOY_USER }}:/var/www/systemsobscure.blog/
|
2025-07-08 17:23:45 +01:00
|
|
|
rm /tmp/ssh_key
|
2025-11-18 17:59:20 +00:00
|
|
|
- name: Notify success
|
|
|
|
|
if: success()
|
|
|
|
|
run: |
|
|
|
|
|
curl -u thomas:${{ secrets.NTFY_PASSWORD }} \
|
|
|
|
|
-H "Tags: Forgejo Runner" \
|
|
|
|
|
-d "🟩 systemsobscure.blog successfully deployed" \
|
2025-11-18 18:14:10 +00:00
|
|
|
https://ntfy.systemsobscure.net/sysobs
|
2025-11-18 17:59:20 +00:00
|
|
|
|
|
|
|
|
- name: Notify failure
|
|
|
|
|
if: failure()
|
|
|
|
|
run: |
|
|
|
|
|
curl -u thomas:${{ secrets.NTFY_PASSWORD }} \
|
|
|
|
|
-H "Tags: Forgejo Runner" \
|
|
|
|
|
-d "🟥 systemsobscure.blog deployment failed. See Forgejo Action logs." \
|
2025-11-18 18:14:10 +00:00
|
|
|
https://ntfy.systemsobscure.net/sysobs
|