Add workflow to deploy to IFRS #20
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Deploy to IFRS | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
DeployFrontend: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Install SSH key | |
uses: shimataro/ssh-key-action@v2 | |
with: | |
key: ${{ secrets.IFRS_SSH_KEY }} | |
known_hosts: ${{ secrets.IFRS_SSH_HOST }} | |
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 [email protected]:ifrscanoas/richard-burton/frontend.git | |
- run: git pull --rebase ifrs | |
- run: git push -f ifrs stage-release | |
DeployBackend: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Install SSH key | |
uses: shimataro/ssh-key-action@v2 | |
with: | |
key: ${{ secrets.IFRS_SSH_KEY }} | |
known_hosts: ${{ secrets.IFRS_SSH_HOST }} | |
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 [email protected]:ifrscanoas/richard-burton/backend.git | |
- run: git pull --rebase ifrs | |
- run: git push -f ifrs stage-release |