Skip to content

v2.1.17-3

v2.1.17-3 #5

Workflow file for this run

name: Release Events
on:
release:
types: [published]
workflow_dispatch:
inputs:
environment:
description: 'Environment to run tests against'
type: environment
required: true
permissions:
id-token: write
deployments: write
jobs:
deploy-dev-website:
name: Deploy website
runs-on: ubuntu-latest
environment:
name: dev
url: https://atlas.dev.utah.gov
if: github.event.release.prerelease == true || inputs.environment == 'dev'
steps:
- name: πŸš€ Deploy website
uses: agrc/firebase-website-deploy-composite-action@v1
with:
identity-provider: ${{ secrets.IDENTITY_PROVIDER }}
service-account-email: ${{ secrets.SERVICE_ACCOUNT_EMAIL }}
project-id: ${{ secrets.PROJECT_ID }}
build-command: npm run build -- --mode dev
env:
VITE_FIREBASE_CONFIG: ${{ secrets.FIREBASE_CONFIG }}
deploy-dev-service:
name: Deploy service
runs-on: ubuntu-latest
environment:
name: dev
url: https://atlas.dev.utah.gov
if: github.event.release.prerelease == true || inputs.environment == 'dev'
steps:
- name: πŸš€ Deploy service
uses: google-github-actions/deploy-cloud-functions@v3
timeout-minutes: 10
with:
name: send-email-service
runtime: nodejs20
source_dir: function
entry_point: sendgrid
service_timeout: 30s
max_instance_count: 2
min_instance_count: 0
memory: 128Mi
secrets: 'SENDGRID_API_KEY=projects/${{ secrets.PROJECT_ID }}/secrets/sendgrid'
service_account: function-sa@${{ secrets.PROJECT_ID }}.iam.gserviceaccount.com
deploy-prod-website:
name: Deploy wesbite
runs-on: ubuntu-latest
environment:
name: prod
url: https://chalkdust.ugrc.utah.gov
if: github.event.release.prerelease == false || inputs.environment == 'prod'
steps:
- name: πŸš€ Deploy website
uses: agrc/firebase-website-deploy-composite-action@v1
with:
build-command: npm run build -- --mode production
repo-token: ${{ secrets.GITHUB_TOKEN }}
project-id: ${{ secrets.PROJECT_ID }}
identity-provider: ${{ secrets.IDENTITY_PROVIDER }}
service-account-email: ${{ secrets.SERVICE_ACCOUNT_EMAIL }}
service-now-instance: ${{ secrets.SN_INSTANCE }}
service-now-table: ${{ secrets.SN_TABLE }}
service-now-system-id: ${{ secrets.SN_SYS_ID }}
service-now-username: ${{ secrets.SN_USERNAME }}
service-now-password: ${{ secrets.SN_PASSWORD }}
env:
VITE_FIREBASE_CONFIG: ${{ secrets.FIREBASE_CONFIG }}
deploy-prod-service:
name: Deploy to production
runs-on: ubuntu-latest
environment:
name: prod
url: https://chalkdust.ugrc.utah.gov
if: github.event.release.prerelease == false || inputs.environment == 'prod'
steps:
- name: πŸš€ Deploy service
uses: google-github-actions/deploy-cloud-functions@v3
timeout-minutes: 10
with:
name: send-email-service
runtime: nodejs20
source_dir: function
entry_point: sendgrid
service_timeout: 30s
max_instance_count: 2
min_instance_count: 0
memory: 128Mi
secrets: 'SENDGRID_API_KEY=projects/${{ secrets.PROJECT_ID }}/secrets/sendgrid'
service_account: function-sa@${{ secrets.PROJECT_ID }}.iam.gserviceaccount.com