systems-obscure/.forgejo/workflows/deploy.yaml

40 lines
1.5 KiB
YAML
Raw Normal View History

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
- 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-11-25 17:34:25 +00:00
VITE_WAKAPI_URL: ${{ vars.WAKAPI_URL }}
2025-11-25 17:35:32 +00:00
VITE_WAKAPI_TOKEN: ${{ secrets.WAKAPI_TOKEN }}
2025-07-10 14:47:59 +01:00
- run: |
echo "${{ secrets.VPS_DEPLOY_USER_SSH_KEY }}" > /tmp/ssh_key
2025-07-08 17:23:45 +01:00
chmod 600 /tmp/ssh_key
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
- name: Notify success
if: success()
run: |
curl -u thomas:${{ secrets.NTFY_PASSWORD }} \
-H "Tags: Forgejo Runner" \
-d "🟩 systemsobscure.blog successfully deployed" \
https://ntfy.systemsobscure.net/sysobs
- 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." \
https://ntfy.systemsobscure.net/sysobs