diff --git a/.github/workflows/deploy-to-ifrs.yml b/.github/workflows/deploy-to-ifrs.yml index 796a665b..cb39e890 100644 --- a/.github/workflows/deploy-to-ifrs.yml +++ b/.github/workflows/deploy-to-ifrs.yml @@ -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 "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: @@ -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 "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