systems-obscure/.forgejo/workflows/deploy.yaml
thomasabishop 0cdcc424a4
All checks were successful
Deploy Blog / deploy (push) Successful in 1m8s
infra: add recursive flag for scp
2025-07-10 14:50:46 +01:00

19 lines
632 B
YAML

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
- run: |
echo "${{ secrets.SSH_FORGEJO_KEY }}" > /tmp/ssh_key
chmod 600 /tmp/ssh_key
ssh -i /tmp/ssh_key -o StrictHostKeyChecking=no ${{ vars.VPS_USER }} "bash -c 'rm -rf /var/www/systemsobscure.blog/*'"
scp -i /tmp/ssh_key -o StrictHostKeyChecking=no -r dist/* ${{ vars.VPS_USER }}:/var/www/systemsobscure.blog/
rm /tmp/ssh_key