Added workflow & updated README.md

This commit is contained in:
MarcUs7i 2025-03-24 09:13:12 +01:00
parent 30d747e046
commit d1c997d857
3 changed files with 42 additions and 35 deletions

27
.github/workflows/deploy.yml vendored Normal file
View file

@ -0,0 +1,27 @@
name: Deploy to Production
on:
push:
branches: [ main ]
workflow_dispatch:
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: SSH and deploy
uses: appleboy/ssh-action@master
with:
host: ${{ secrets.SSH_HOST }}
username: ${{ secrets.SSH_USERNAME }}
key: ${{ secrets.SSH_PRIVATE_KEY }}
port: ${{ secrets.SSH_PORT }}
script: |
cd /var/www/marcus7i.net
git pull
npm ci
npm run build
pm2 reload ecosystem.config.cjs || pm2 start ecosystem.config.cjs
# For system restarts
pm2 save