Skip to content

Commit

Permalink
correct deployment
Browse files Browse the repository at this point in the history
  • Loading branch information
rtertiaer committed Jul 3, 2024
1 parent df3961a commit 1f6ebc1
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
12 changes: 7 additions & 5 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
2 changes: 1 addition & 1 deletion opentofu/deploy.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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/${data.google_project.project.project_id}/buckets/${google_storage_bucket.static_site.name}/')"
}
}

Expand Down

0 comments on commit 1f6ebc1

Please sign in to comment.