Add workflow to deploy to IFRS #6
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 | ||
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} | ||
Check failure on line 17 in .github/workflows/deploy-to-ifrs.yml GitHub Actions / Deploy to IFRSInvalid workflow file
|
||
if_key_exists: fail | ||
- uses: actions/checkout@v3 | ||
- run: git subtree split -P frontend -b gitlab-ifrs/frontend | ||
- run: git checkout gitlab-ifrs/frontend | ||
- run: git reset --hard | ||
- run: git push -f $IFRS_GITLAB_FRONTEND_REPO_URL 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 gitlab-ifrs/backend | ||
- run: git checkout gitlab-ifrs/backend | ||
- run: git reset --hard | ||
- run: git push -f $IFRS_GITLAB_BACKEND_REPO_URL stage-release |