From 6eee24d8a9fe66a1ff1175752d11609abaa57b5d Mon Sep 17 00:00:00 2001 From: Ron Shapiro Date: Sun, 13 Oct 2024 11:41:39 +0300 Subject: [PATCH] Deploy automatically when committing to the base branch --- .github/workflows/deploy-gcp.yml | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 .github/workflows/deploy-gcp.yml diff --git a/.github/workflows/deploy-gcp.yml b/.github/workflows/deploy-gcp.yml new file mode 100644 index 00000000..eee9b318 --- /dev/null +++ b/.github/workflows/deploy-gcp.yml @@ -0,0 +1,32 @@ +name: Deploy to GCP +run-name: "Deploying to GCP: sha ${GITHUB_SHA}" +on: + push: + branches: [base] +jobs: + gcp_deploy: + # Add "id-token" with the intended permissions. + permissions: + contents: 'read' + id-token: 'write' + + steps: + - uses: 'actions/checkout@v4' + + - uses: actions/setup-node@v4 + with: + node-version: 20 + cache: 'npm' + cache-dependency-path: package-lock.json + + - id: 'build' + run: 'npm run parcel-prod' + + - id: 'auth' + uses: 'google-github-actions/auth@v2' + with: + project_id: 'my-project' + workload_identity_provider: 'projects/766008139306/locations/global/workloadIdentityPools/github/providers/talmud-page-repo' + + - id: 'deploy' + uses: 'google-github-actions/deploy-appengine@v2'