-
Notifications
You must be signed in to change notification settings - Fork 12
32 lines (31 loc) · 1 KB
/
deploy.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
name: Deploy
on:
push:
branches:
- main
- '*'
workflow_dispatch: {}
jobs:
deploy:
name: deploy-gcf
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Google Cloud Authentication
uses: google-github-actions/auth@v2
with:
project_id: ${{ secrets.PROJECT_ID }}
credentials_json: ${{ secrets.SERVICE_ACCOUNT_KEY }}
- name: Set up Cloud SDK
uses: google-github-actions/setup-gcloud@v2
with:
# probot/example-google-cloud-function credentials provided by @bcoe
project_id: ${{ secrets.PROJECT_ID }}
- name: Deploy to GCF
run: |
gcloud functions deploy example-google-cloud-function \
--runtime nodejs20 \
--allow-unauthenticated \
--trigger-http \
--entry-point probotApp \
--set-env-vars APP_ID="${{secrets.APP_ID}}",PRIVATE_KEY="${{secrets.PRIVATE_KEY}}",WEBHOOK_SECRET="${{secrets.WEBHOOK_SECRET}}"