Skip to content

Commit

Permalink
fix branch for production deploy
Browse files Browse the repository at this point in the history
  • Loading branch information
geleeroyale committed Sep 24, 2024
1 parent 73d0875 commit 7e327e5
Show file tree
Hide file tree
Showing 3 changed files with 59 additions and 5 deletions.
27 changes: 27 additions & 0 deletions .github/workflows/rpgf4-production-deploy.yml
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
27 changes: 27 additions & 0 deletions .github/workflows/rpgf4-staging-deploy.yml
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
10 changes: 5 additions & 5 deletions .github/workflows/rpgf5-production-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ name: rpgf5-prod-deploy-pipeline

on:
workflow_dispatch:
# push:
# branches:
# - master
push:
branches:
- master

jobs:
publish:
Expand Down Expand Up @@ -43,8 +43,8 @@ jobs:
script: |
cd pw-backend
git reset --hard HEAD~1
git checkout rpgf5
git pull origin rpgf5
git checkout master
git pull origin master
docker image prune -a --force
docker compose -f docker-compose-prod.yml pull
Expand Down

0 comments on commit 7e327e5

Please sign in to comment.