-
Notifications
You must be signed in to change notification settings - Fork 0
33 lines (33 loc) · 946 Bytes
/
deploy.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
name: deploy prod
on:
push:
branches:
- main
jobs:
deploy:
runs-on: ubuntu-latest
environment: prod
permissions:
contents: 'read'
id-token: 'write'
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
with:
token_format: access_token
project_id: ${{ secrets.PROJECT_ID }}
workload_identity_provider: ${{ secrets.WORKLOAD_IDENTITY_PROVIDER }}
service_account: ${{ secrets.DEPLOY_SERVICE_ACCOUNT }}
- name: 'Set up gcloud'
uses: 'google-github-actions/setup-gcloud@v2'
- name: Build & deploy site
run: |
sudo apt install hugo
hugo
hugo deploy
gcloud compute url-maps invalidate-cdn-cache engineering-blog-prod --path "/*" --async