From a583daf81187ec0c468ab5ce57147cc03a8cd100 Mon Sep 17 00:00:00 2001 From: Ryan Tasson Date: Wed, 3 Jul 2024 18:36:56 -0400 Subject: [PATCH] correct deployment --- .github/workflows/deploy.yml | 12 +++++++----- opentofu/deploy.tf | 2 +- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index efdf39c..7e25408 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -13,6 +13,8 @@ jobs: steps: - name: Check out repository code uses: actions/checkout@v4 + with: + submodules: 'true' - name: log in to GCP id: auth uses: google-github-actions/auth@v2 @@ -24,8 +26,8 @@ jobs: - name: 'Set up gcloud' uses: 'google-github-actions/setup-gcloud@v2' - name: Build & deploy site - steps: - - run: apt install hugo - - run: hugo - - run: hugo deploy - - run: gcloud compute url-maps invalidate-cdn-cache blog-prod --path "/*" --async + run: | + sudo apt install hugo + hugo + hugo deploy + gcloud compute url-maps invalidate-cdn-cache blog-prod --path "/*" --async diff --git a/opentofu/deploy.tf b/opentofu/deploy.tf index df3e168..e9166e9 100644 --- a/opentofu/deploy.tf +++ b/opentofu/deploy.tf @@ -79,7 +79,7 @@ resource "google_project_iam_binding" "static_site_bucket" { condition { title = "only_static_bucket_contents" - expression = "resource.type == 'storage.googleapis.com/Object' && resource.name.startsWith('projects/_/buckets/${google_storage_bucket.static_site.name}/')" + expression = "resource.name.startsWith('projects/_/buckets/${google_storage_bucket.static_site.name}')" } }