Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
Calemy committed Jul 4, 2024
2 parents 840ac26 + 4466992 commit f7f2067
Showing 1 changed file with 2 additions and 17 deletions.
19 changes: 2 additions & 17 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,21 +11,6 @@ on:
jobs:
Update:
runs-on: self-hosted
strategy:
matrix:
hosts: [[email protected]]
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Create deployment archive
run: |
mkdir deployment
tar --exclude='./deployment' --exclude='./.git' --exclude='./.github' -czvf deployment/code.tar.gz .
- name: Stop PM2 Advance
run: ssh ${{ matrix.hosts }} "pm2 stop advance"
- name: Copy new code via SCP
run: scp deployment/code.tar.gz ${{ matrix.hosts }}:~/Advance
- name: Deploy new code
run: ssh ${{ matrix.hosts }} "cd ~/Advance && tar -xzf code.tar.gz && rm code.tar.gz"
- name: Install dependencies and start Advance
run: ssh ${{ matrix.hosts }} "cd ~/Advance && npm i && pm2 restart advance && pm2 save"
- name: Deploy new code, install dependencies and start Advance
run: ssh [email protected] "cd ~/Advance && git pull && npm i && pm2 restart advance && pm2 save"

0 comments on commit f7f2067

Please sign in to comment.