-
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.
Merge pull request #1158 from hngprojects/dev
Merge branch 'dev' into staging
- Loading branch information
Showing
83 changed files
with
2,084 additions
and
1,136 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
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,27 @@ | ||
# name: PR Deploy | ||
# on: | ||
# pull_request_target: | ||
# branches: | ||
# - dev | ||
|
||
# jobs: | ||
# deploy-pr-for-testing: | ||
# environment: | ||
# name: preview | ||
# url: ${{ steps.deploy.outputs.preview-url }} | ||
# runs-on: ubuntu-latest | ||
# steps: | ||
# - name: Checkout to branch | ||
# uses: actions/checkout@v4 | ||
# - id: deploy | ||
# name: Pull Request Deploy | ||
# uses: hngprojects/pr-deploy@dev | ||
# with: | ||
# server_host: ${{ secrets.HOST }} | ||
# server_username: ${{ secrets.USERNAME }} | ||
# server_password: ${{ secrets.PASSWORD }} | ||
# comment: false | ||
# context: . | ||
# dockerfile: Dockerfile | ||
# exposed_port: 5000 | ||
# github_token: ${{ secrets.GITHUB_TOKEN }} |
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,21 @@ | ||
name: Production Deployment | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
deploy-prod: | ||
runs-on: ubuntu-latest | ||
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 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: Scheduled Test | ||
|
||
on: | ||
schedule: | ||
- cron: '*/15 * * * *' | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
|
||
- name: Run test script | ||
env: | ||
POSTMAN_API_KEY: ${{ secrets.POSTMAN_API_KEY }} | ||
API_URL: ${{ secrets.API_URL }} | ||
run: | | ||
cd qa | ||
chmod +x test.sh | ||
./test.sh |
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
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" | ||
} | ||
] | ||
} | ||
} |
Oops, something went wrong.