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

19 lines
630 B
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
2025-07-08 17:28:04 +01:00
- name: Create dummy file and deploy
2025-07-08 17:23:45 +01:00
run: |
2025-07-08 17:28:04 +01:00
echo "test content" > test.txt
echo "${{ secrets.SSH_FORGEJO_KEY }}" > /tmp/ssh_key
2025-07-08 17:23:45 +01:00
chmod 600 /tmp/ssh_key
2025-07-10 14:39:31 +01:00
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 test.txt ${{ vars.VPS_USER }}:/var/www/systemsobscure.blog/
2025-07-08 17:23:45 +01:00
rm /tmp/ssh_key