Skip to content

Merge pull request #566 from volodkindv/554-fix-pg8000-conn #9

Merge pull request #566 from volodkindv/554-fix-pg8000-conn

Merge pull request #566 from volodkindv/554-fix-pg8000-conn #9

name: Deploy-GCF-Connect-To-Forum
env:
FILE_NAME: connect_to_forum # UPD HERE!
on:
push:
branches : [main]
paths:
- 'src/_dependencies/*'
- 'src/connect_to_forum/*' # UPD HERE!
- '.github/workflows/deploy_connect_to_forum.yml' # UPD HERE!
jobs:
deploy_function:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Make dependencies
run: make dependencies
- name: Authenticate in GCP
id: auth
uses: google-github-actions/auth@v1
with:
credentials_json: ${{ secrets.gcp_credentials }}
- name: Deploy the CF
id: deploy
uses: google-github-actions/deploy-cloud-functions@v1
with:
source_dir: src/${{ env.FILE_NAME }} # name of directory
name: ${{ env.FILE_NAME }} # name of deploying function
runtime: python310
entry_point: main # UPD HERE! main function
region: europe-west3
timeout: 540 # UPD HERE!
max_instances: 1 # UPD HERE!
memory_mb: 256 # 8192 # UPD HERE!
event_trigger_type: providers/cloud.pubsub/eventTypes/topic.publish
event_trigger_resource: projects/lizaalert-bot-01/topics/parse_user_profile_from_forum # UPD HERE! topic