Skip to content

Commit 2586394

Browse files
committed
switch to offical action
1 parent f3dfffb commit 2586394

1 file changed

Lines changed: 10 additions & 6 deletions

File tree

.github/workflows/main.yml

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,14 @@ jobs:
1919
- name: Build Hugo site
2020
run: hugo -D
2121

22-
- name: Setup GCP Credentials
23-
run: echo "${{ secrets.GCP_SA_KEY }}" > $HOME/gcp-key.json
22+
- name: Authenticate to Google Cloud
23+
uses: google-github-actions/auth@v2
24+
with:
25+
credentials_json: ${{ secrets.GCP_SA_KEY }}
2426

25-
- - name: Sync files to GCS
26-
env:
27-
GOOGLE_APPLICATION_CREDENTIALS: $HOME/gcp-key.json
28-
run: gsutil -m rsync -r ./public gs://${{ secrets.GCP_BUCKET }}
27+
- name: Upload files to GCS
28+
uses: google-github-actions/upload-cloud-storage@v1
29+
with:
30+
path: ./public
31+
destination: ${{ secrets.GCP_BUCKET }}
32+
parent: false

0 commit comments

Comments
 (0)