ci: only deploy firebase on pushes to dev #42
Workflow file for this run
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: Push Events | |
on: | |
push: | |
branches: | |
- dev | |
- main | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
release-please: | |
name: Create release | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
pull-requests: write | |
if: github.ref_name == 'main' | |
steps: | |
- name: 🚀 Create Release | |
id: release-please | |
uses: agrc/release-composite-action@v1 | |
with: | |
repo-token: ${{ secrets.GITHUB_TOKEN }} | |
github-app-id: ${{ secrets.UGRC_RELEASE_BOT_APP_ID }} | |
github-app-key: ${{ secrets.UGRC_RELEASE_BOT_APP_KEY }} | |
github-app-name: ${{ secrets.UGRC_RELEASE_BOT_NAME }} | |
github-app-email: ${{ secrets.UGRC_RELEASE_BOT_EMAIL }} | |
deploy-firebase-dev: | |
name: Deploy Firebase project to staging | |
runs-on: ubuntu-latest | |
if: github.ref_name == 'dev' | |
permissions: | |
id-token: write | |
environment: | |
name: dev | |
url: https://ut-dts-agrc-moonwalk-dev.web.app/ | |
steps: | |
- name: ⬇️ Set up code | |
uses: actions/checkout@v4 | |
with: | |
show-progress: false | |
- name: 🚀 Deploy | |
uses: ./.github/actions/deploy-firebase | |
with: | |
identity_provider: ${{ secrets.IDENTITY_PROVIDER }} | |
service_account_email: ${{ secrets.SERVICE_ACCOUNT_EMAIL }} | |
project_id: ${{ secrets.PROJECT_ID }} | |
firebase_config: ${{ secrets.FIREBASE_CONFIG }} | |
build_command: npm run build -- --mode dev | |
deploy-cloudrun-dev: | |
name: Deploy Cloud Run to dev | |
runs-on: ubuntu-latest | |
if: github.ref_name == 'dev' | |
environment: | |
name: dev | |
permissions: | |
id-token: write | |
contents: read | |
steps: | |
- name: ⬇️ Set up code | |
uses: actions/checkout@v4 | |
with: | |
show-progress: false | |
- name: 🚀 Deploy | |
uses: ./.github/actions/deploy-cloudrun | |
timeout-minutes: 15 | |
with: | |
project_id: ${{ secrets.PROJECT_ID }} | |
identity_provider: ${{ secrets.IDENTITY_PROVIDER }} | |
service_account_email: ${{ secrets.SERVICE_ACCOUNT_EMAIL }} | |
pause_schedule_job: 'yes' | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
agol_org: ${{ vars.AGOL_ORG }} | |
tag_name: ${{ vars.TAG_NAME }} |