-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' of https://github.com/osuAdvance/Advance
- Loading branch information
Showing
1 changed file
with
2 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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" |