Deploy a GCP Cloud Function from Github
Updated May 26, 2024Created June 30, 2020
Create a github directory and add the following:
The build spec
./cloudbuild.yaml
steps: - name: "gcr.io/cloud-builders/gcloud" args: - functions - deploy - [function_name] - --source=. - --region=europe-west1 - --entry-point=main - --trigger-http - --runtime=python37 - --allow-unauthenticated
Function
./main.py
def main (): return "hello"
Done!