From 197290a88e8831cc3278b9b4c4b8686b1dace5ab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9s=20Vidal?= Date: Mon, 22 Apr 2024 21:45:23 -0300 Subject: [PATCH] Fix deployment script MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Andrés Vidal --- .github/workflows/deploy-to-ifrs.yml | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/.github/workflows/deploy-to-ifrs.yml b/.github/workflows/deploy-to-ifrs.yml index 796a665b..ee76b5c0 100644 --- a/.github/workflows/deploy-to-ifrs.yml +++ b/.github/workflows/deploy-to-ifrs.yml @@ -16,14 +16,15 @@ jobs: - uses: actions/checkout@v3 - run: git config --global user.email "ghactions@wyeworks.com" - run: git config --global user.name "GitHub Actions from WyeWorks" + - run: git remote add ifrs-frontend git@gitlab.com: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 git@gitlab.com: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 reset --soft ifrs-frontend/stage + - run: rm -f Dockerfile .dockerignore + - 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: @@ -39,12 +40,13 @@ jobs: - run: export TZ=America/Sao_Paulo - run: git config --global user.email "ghactions@wyeworks.com" - run: git config --global user.name "GitHub Actions from WyeWorks" + - run: git remote add ifrs-backend git@gitlab.com: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 git@gitlab.com: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 reset --soft ifrs-backend/stage + - run: rm -f Dockerfile .dockerignore + - 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