Prerequisites:
Run:
gcloud init
pnpm deploy
# Or specify version:
# pnpm deploy -- --quiet --project=hello-irkfap-com --version=production
-
Enable App Engine Admin API for your project.
-
Launch
scripts/setup_gcloud.sh [PROJECT_ID]
script OR do a manual setup via Cloud Console:Add Service Account in Cloud Console → IAM & Admin → Service Accounts and assign it the following Roles:
- App Engine Deployer
- App Engine Service Admin (to switch traffic to the new version)
- Cloud Build Service Account (gcloud app deploy requires this)
- Storage Object Viewer
- Storage Object Creator (to upload new files)
- Service Account User (to run operations as a service account)
Create json key and base64-encode it:
base64 ~/Downloads/xxx.json # or openssl base64 -in ~/Downloads/xxx.json | tr -d '\n'
-
Add project secrets in GitHub repo Settings → Secrets:
GCP_SA_EMAIL
— Service Account EmailGOOGLE_APPLICATION_CREDENTIALS
— base64-encoded Service Account key -
Customize Workflow as needed in
.github/workflows/main.yml
(setGCLOUD_PROJECT_ID
, etc.)