mirror of
https://gitlab.com/vyla-entertainment/live.git
synced 2026-11-13 13:47:23 -05:00
Sync project files
This commit is contained in:
33
.github/workflows/vps-deploy.yml
vendored
Normal file
33
.github/workflows/vps-deploy.yml
vendored
Normal file
@@ -0,0 +1,33 @@
|
||||
name: Deploy to VPS
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
|
||||
jobs:
|
||||
deploy:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Deploy via SSH
|
||||
uses: appleboy/ssh-action@v1.2.0
|
||||
with:
|
||||
host: ${{ secrets.VPS_HOST }}
|
||||
username: root
|
||||
key: ${{ secrets.SSH_PRIVATE_KEY }}
|
||||
script: |
|
||||
cd /var/www/live-api-streampk
|
||||
|
||||
git fetch origin main
|
||||
git reset --hard origin/main
|
||||
git clean -fd
|
||||
|
||||
npm install
|
||||
|
||||
chown -R www-data:www-data /var/www/live-api-streampk
|
||||
chmod -R 755 /var/www/live-api-streampk
|
||||
|
||||
pm2 restart live-api-streampk || pm2 start server.js --name live-api-streampk
|
||||
|
||||
pm2 save
|
||||
Reference in New Issue
Block a user