readme 수정 #3
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: google cloud functions 배포 | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Cloud SDK | |
uses: google-github-actions/setup-gcloud@v0 | |
with: | |
project_id: ${{ secrets.GCP_PROJECT_ID }} | |
service_account_key: ${{ secrets.GCP_SA_KEY }} | |
export_default_credentials: true | |
- name: Deploy Function | |
run: | | |
gcloud functions deploy tarakyubot \ | |
--runtime nodejs20 \ | |
--trigger-http \ | |
--allow-unauthenticated \ | |
--region asia-northeast3 \ | |
--entry-point handle \ | |
--set-env-vars SLACK_BOT_TOKEN='${{ secrets.SLACK_BOT_TOKEN }}',SLACK_SIGNING_SECRET='${{ secrets.SLACK_SIGNING_SECRET }}',OPENAI_API_KEY='${{ secrets.OPENAI_API_KEY }}' |