-
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.
- Loading branch information
1 parent
73d0875
commit 7e327e5
Showing
3 changed files
with
59 additions
and
5 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 |
---|---|---|
@@ -0,0 +1,27 @@ | ||
name: production-deploy-pipeline | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
|
||
jobs: | ||
deploy: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: SSH and Redeploy Production | ||
uses: appleboy/[email protected] | ||
with: | ||
host: ${{ secrets.PROD_HOST }} | ||
username: ${{ secrets.PROD_USERNAME }} | ||
key: ${{ secrets.PROD_PRIVATE_KEY }} | ||
port: ${{ secrets.SSH_PORT }} | ||
script: | | ||
cd rpgf4-pw-backend | ||
docker-compose down -v | ||
docker image prune -a --force | ||
git checkout master | ||
git reset --hard origin/master | ||
git pull origin master | ||
docker-compose build --no-cache | ||
docker-compose up -d |
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: staging-deploy-pipeline | ||
|
||
on: | ||
push: | ||
branches: | ||
- staging | ||
|
||
jobs: | ||
deploy: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: SSH and Redeploy Staging | ||
uses: appleboy/[email protected] | ||
with: | ||
host: ${{ secrets.STAGING_HOST }} | ||
username: ${{ secrets.STAGING_USERNAME }} | ||
key: ${{ secrets.STAGING_PRIVATE_KEY }} | ||
port: ${{ secrets.SSH_PORT }} | ||
script: | | ||
cd rpgf4-pw-backend | ||
docker-compose down -v | ||
docker image prune -a --force | ||
git checkout staging | ||
git reset --hard origin/staging | ||
git pull origin staging | ||
docker-compose build --no-cache | ||
docker-compose up -d |
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