Skip to content

Commit

Permalink
Fix deployment script
Browse files Browse the repository at this point in the history
Signed-off-by: Andrés Vidal <[email protected]>
  • Loading branch information
andres-vidal committed Apr 23, 2024
1 parent cea6e8e commit 6919038
Showing 1 changed file with 18 additions and 12 deletions.
30 changes: 18 additions & 12 deletions .github/workflows/deploy-to-ifrs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,19 @@ jobs:
known_hosts: ${{ secrets.IFRS_SSH_HOST }}
if_key_exists: fail
- uses: actions/checkout@v3
with:
fetch-depth: 0
- run: git config --global user.email "[email protected]"
- run: git config --global user.name "GitHub Actions from WyeWorks"
- run: git remote add ifrs-frontend [email protected]:ifrscanoas/richard-burton/frontend.git
- run: git subtree split -P frontend -b stage-release
- run: git checkout stage-release
- run: git clean -f -d
- run: rm -f Dockerfile .dockerignore
- run: git commit -a -m "Remove Dockerfile and .dockerignore"
- run: git remote add ifrs-frontend [email protected]:ifrscanoas/richard-burton/frontend.git
- run: git reset $(git commit-tree HEAD^{tree} -m "Release to Stage `TZ=America/Sao_Paulo date '+%d %b %Y %T São Paulo (UTC%Z)'`")
- run: git pull --rebase ifrs-frontend stage -X theirs
- run: git rm --cached Dockerfile .dockerignore
- run: git pull --rebase ifrs-frontend stage -X ours
- run: git reset --soft ifrs-frontend/stage
- run: git add . -A
- run: git status
- run: git commit -m "Release to Stage `TZ=America/Sao_Paulo date '+%d %b %Y %T São Paulo (UTC%Z)'`"
- run: git push -f ifrs-frontend stage-release

DeployBackend:
Expand All @@ -36,15 +39,18 @@ jobs:
known_hosts: ${{ secrets.IFRS_SSH_HOST }}
if_key_exists: fail
- uses: actions/checkout@v3
with:
fetch-depth: 0
- run: export TZ=America/Sao_Paulo
- run: git config --global user.email "[email protected]"
- run: git config --global user.name "GitHub Actions from WyeWorks"
- run: git remote add ifrs-backend [email protected]:ifrscanoas/richard-burton/backend.git
- run: git subtree split -P backend -b stage-release
- run: git checkout stage-release
- run: git clean -f -d
- run: rm -f Dockerfile .dockerignore
- run: git commit -a -m "Remove Dockerfile and .dockerignore"
- run: git remote add ifrs-backend [email protected]:ifrscanoas/richard-burton/backend.git
- run: git reset $(git commit-tree HEAD^{tree} -m "Release to Stage `TZ=America/Sao_Paulo date '+%d %b %Y %T São Paulo (UTC%Z)'`")
- run: git pull --rebase ifrs-backend stage -X theirs
- run: git rm --cached Dockerfile .dockerignore
- run: git pull --rebase ifrs-backend stage -X ours
- run: git reset --soft ifrs-backend/stage
- run: git add . -A
- run: git status
- run: git commit -m "Release to Stage `TZ=America/Sao_Paulo date '+%d %b %Y %T São Paulo (UTC%Z)'`"
- run: git push -f ifrs-backend stage-release

0 comments on commit 6919038

Please sign in to comment.