-
Notifications
You must be signed in to change notification settings - Fork 192
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: reverting back to process manager deployment
- Loading branch information
1 parent
2ae7e97
commit 5d059fa
Showing
11 changed files
with
58 additions
and
134 deletions.
There are no files selected for viewing
File renamed without changes.
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -0,0 +1,22 @@ | ||
name: Production Deployment | ||
|
||
on: | ||
workflow_dispatch: | ||
push: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
deploy-prod: | ||
runs-on: bingo-server | ||
steps: | ||
- name: Deploy on server | ||
uses: appleboy/ssh-action@master | ||
with: | ||
host: ${{ secrets.HOST }} | ||
username: ${{ secrets.USERNAME }} | ||
password: ${{ secrets.PASSWORD }} | ||
script: | | ||
cd main | ||
chmod +x deployment.sh | ||
./deployment.sh main |
This file was deleted.
Oops, something went wrong.
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
File renamed without changes.
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
File renamed without changes.
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 |
---|---|---|
@@ -0,0 +1,23 @@ | ||
#!/bin/bash | ||
|
||
BRANCH=$1 | ||
|
||
# checkout | ||
git checkout $BRANCH; | ||
|
||
git pull origin $BRANCH; | ||
|
||
# install dependencies | ||
npm install --include=dev; | ||
|
||
# run build | ||
npm run build; | ||
|
||
|
||
git stash | ||
|
||
# run migration | ||
npm run migration:run; | ||
|
||
# run start | ||
pm2 restart $BRANCH-ecosystem-config.json || pm2 start $BRANCH-ecosystem-config.json; |
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 |
---|---|---|
@@ -1,11 +1,11 @@ | ||
{ | ||
"apps": [ | ||
{ | ||
"name": "team-alpha-prod", | ||
"name": "nestjs-prod", | ||
"script": "npm run start:prod", | ||
"log_file": "~/.pm2/logs/team-alpha-prod-out.log", | ||
"combine_logs": true, | ||
"log_date_format": "YYYY-MM-DD HH:mm:ss Z" | ||
} | ||
] | ||
} | ||
} |
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 |
---|---|---|
@@ -1,11 +1,11 @@ | ||
{ | ||
"apps": [ | ||
{ | ||
"name": "team-alpha-staging", | ||
"name": "nestjs2-staging", | ||
"script": "npm run start:prod", | ||
"log_file": "~/.pm2/logs/team-alpha-staging-out.log", | ||
"combine_logs": true, | ||
"log_date_format": "YYYY-MM-DD HH:mm:ss Z" | ||
} | ||
] | ||
} | ||
} |