Skip to content

Commit

Permalink
ci: create job to deploy report pdf
Browse files Browse the repository at this point in the history
refs #273
  • Loading branch information
steveoh committed Dec 13, 2023
1 parent 3851603 commit 9f8e039
Showing 1 changed file with 50 additions and 0 deletions.
50 changes: 50 additions & 0 deletions .github/workflows/push.functions.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: Push Events (Functions)

on:
push:
branches:
- main
- dev
paths:
- "src/functions/**"
- ".github/workflows/push.functions.yml"

concurrency:
group: "${{ github.head_ref || github.ref }}"
cancel-in-progress: true

jobs:
deploy-dev:
name: Deploy to dev
runs-on: ubuntu-latest
permissions:
id-token: write
contents: read
environment:
name: dev

steps:
- name: ⬇️ Set up code
uses: actions/checkout@v4
with:
show-progress: false

- id: auth
name: 🗝️ Authenticate to Google Cloud
uses: google-github-actions/auth@v1
with:
create_credentials_file: true
token_format: access_token
workload_identity_provider: ${{ secrets.IDENTITY_PROVIDER }}
service_account: ${{ secrets.SERVICE_ACCOUNT_EMAIL }}

- name: 🚀 Deploy Cloud Function
id: deploy
uses: google-github-actions/deploy-cloud-functions@v1
with:
name: pdf
runtime: nodejs20
source_dir: src/functions
service_account_email: cloud-function-sa@${{ secrets.PROJECT_ID }}.iam.gserviceaccount.com
https_trigger_security_level: "secure_always"
timeout: "2m"

0 comments on commit 9f8e039

Please sign in to comment.