diff --git a/.github/workflows/deploy-to-ifrs.yml b/.github/workflows/deploy-to-ifrs.yml new file mode 100644 index 00000000..16b47ad9 --- /dev/null +++ b/.github/workflows/deploy-to-ifrs.yml @@ -0,0 +1,43 @@ +name: Deploy to IFRS +on: + push: + branches: + - main +jobs: + DeployFrontend: + runs-on: ubuntu-latest + env: + IFRS_GITLAB_SSH_KEY: ${{ secrets.IFRS_GITLAB_SSH_KEY }} + IFRS_GITLAB_FRONTEND_REPO_URL: ${{ secrets.IFRS_GITLAB_FRONTEND_REPO_URL }} + steps: + - name: Install SSH key + uses: shimataro/ssh-key-action@v2 + with: + key: ${{ secrets.IFRS_GITLAB_SSH_KEY }} + known_hosts: ${{ secrets.IFRS_GITLAB_HOST_KEY }} + if_key_exists: fail + - uses: actions/checkout@v3 + - run: git subtree split -P frontend -b stage-release + - run: git checkout stage-release + - run: git reset --hard + - run: git remote add ifrs git@gitlab.com:ifrscanoas/richard-burton/frontend.git + - run: git push -f ifrs stage-release + + DeployBackend: + runs-on: ubuntu-latest + env: + IFRS_GITLAB_SSH_KEY: ${{ secrets.IFRS_GITLAB_SSH_KEY }} + IFRS_GITLAB_BACKEND_REPO_URL: ${{ secrets.IFRS_GITLAB_BACKEND_REPO_URL }} + steps: + - name: Install SSH key + uses: shimataro/ssh-key-action@v2 + with: + key: ${{ secrets.IFRS_GITLAB_SSH_KEY }} + known_hosts: ${{ secrets.IFRS_GITLAB_HOST_KEY }} + if_key_exists: fail + - uses: actions/checkout@v3 + - run: git subtree split -P backend -b stage-release + - run: git checkout stage-release + - run: git reset --hard + - run: git remote add ifrs git@gitlab.com:ifrscanoas/richard-burton/backend.git + - run: git push -u ifrs stage-release