-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add publish_static action for uploading to private bucket
- Loading branch information
Showing
3 changed files
with
35 additions
and
1 deletion.
There are no files selected for viewing
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
name: Publish static files to a cloud bucket | ||
|
||
on: | ||
workflow_dispatch: | ||
push: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
Deploy: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: 'read' | ||
id-token: 'write' | ||
|
||
steps: | ||
- uses: 'actions/checkout@v4' | ||
|
||
- id: 'auth' | ||
uses: 'google-github-actions/[email protected]' | ||
with: | ||
project_id: 'probcomp-caliban' | ||
workload_identity_provider: 'projects/110275315150/locations/global/workloadIdentityPools/gen-website-private-publishers/providers/github' | ||
service_account: 'gen-website-private-admin@probcomp-caliban.iam.gserviceaccount.com' | ||
audience: '//iam.googleapis.com/projects/110275315150/locations/global/workloadIdentityPools/gen-website-private-publishers/providers/github' | ||
- name: Create info.json | ||
run: | | ||
echo '{ "createdAt": "'$(date -u +%Y-%m-%dT%H:%M:%SZ)'" }' > ./public/info.json | ||
- id: 'deploy' | ||
run: | | ||
gcloud storage rsync --recursive ./public gs://gen-website-private/${{github.repository}} | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters