Update deploy.yml #101
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 | |
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}}" |