mirror of
https://github.com/Kizuren/kizuren.dev.git
synced 2026-01-04 21:54:16 +01:00
Added workflow & updated README.md
This commit is contained in:
parent
30d747e046
commit
d1c997d857
3 changed files with 42 additions and 35 deletions
27
.github/workflows/deploy.yml
vendored
Normal file
27
.github/workflows/deploy.yml
vendored
Normal 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
|
||||
Loading…
Add table
Add a link
Reference in a new issue