From 14a8b50268f4f087b7e3df903bc759322902e206 Mon Sep 17 00:00:00 2001 From: Joe Corall Date: Thu, 30 Nov 2023 05:09:30 -0500 Subject: [PATCH] Invalidate CDN cache on deployment --- .github/workflows/deploy.yml | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index ecf692c..a20ec58 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -35,4 +35,13 @@ jobs: region: ${{ secrets.GCLOUD_REGION }} - name: 'Use output' run: 'curl -v -s -o /dev/null "${{ steps.deploy.outputs.url }}"' - + - name: 'Set up Cloud SDK' + uses: 'google-github-actions/setup-gcloud@v1' + with: + version: '>= 455.0.0' + - name: 'Invalidate cache' + run: | + gcloud compute url-maps invalidate-cdn-cache ${{ secrets.GCLOUD_LB }} \ + --host docs.libops.io \ + --path "/*" \ + --project ${{ secrets.GCLOUD_PROJECT }}