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