Skip to content

Instantly share code, notes, and snippets.

@ivamluz
Created July 19, 2020 21:04
Show Gist options
  • Save ivamluz/69ac550b8090b0115b45f755008e57ef to your computer and use it in GitHub Desktop.
Save ivamluz/69ac550b8090b0115b45f755008e57ef to your computer and use it in GitHub Desktop.
Scripting for deploying the Pub/Sub-triggered cloud function
#! /bin/bash
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
SOURCE_DIR="${DIR}/../src"
source "${DIR}/.env.local"
gcloud functions \
deploy ${FUNCTION_NAME_PUBSUB} \
--source=${SOURCE_DIR} \
--runtime=python37 \
--trigger-topic=${PUBSUB_TOPIC}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment