-
Notifications
You must be signed in to change notification settings - Fork 122
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #621 from AmbientRun/deploy-web
Deploy ambient web client
- Loading branch information
Showing
9 changed files
with
218 additions
and
59 deletions.
There are no files selected for viewing
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
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,66 @@ | ||
name: "deploy-web" | ||
|
||
on: | ||
workflow_dispatch: | ||
push: | ||
tags: [v*] | ||
branches: | ||
- main | ||
|
||
env: | ||
PACKAGE_NAME: ambient-web-${{ github.sha }} | ||
|
||
jobs: | ||
build: | ||
permissions: | ||
id-token: write | ||
runs-on: ubuntu-20.04 | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- uses: dtolnay/rust-toolchain@stable | ||
with: | ||
toolchain: stable | ||
target: wasm32-unknown-unknown | ||
|
||
- name: "Build campfire" | ||
uses: actions-rs/cargo@v1 | ||
with: | ||
command: build | ||
args: --package campfire | ||
|
||
- name: "Build web client" | ||
uses: actions-rs/cargo@v1 | ||
with: | ||
command: run | ||
args: --package campfire -- web build --profile release --target standalone --pkg-name ${{ env.PACKAGE_NAME }} | ||
|
||
- name: Upload package | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: ambient-web-standalone | ||
path: ./web/${{ env.PACKAGE_NAME }} | ||
|
||
- id: auth | ||
name: Authenticate with Google Cloud | ||
uses: google-github-actions/auth@v0 | ||
with: | ||
token_format: access_token | ||
workload_identity_provider: projects/549180905870/locations/global/workloadIdentityPools/github-pool/providers/github-provider | ||
service_account: [email protected] | ||
access_token_lifetime: 1800s | ||
|
||
- name: Upload to Google Cloud | ||
uses: google-github-actions/upload-cloud-storage@v1 | ||
with: | ||
path: "./web/${{ env.PACKAGE_NAME }}" | ||
destination: "ambient-artifacts/ambient-web-clients" | ||
|
||
- name: Upload Canary to Google Cloud | ||
uses: google-github-actions/upload-cloud-storage@v1 | ||
with: | ||
path: "./web/${{ env.PACKAGE_NAME }}" | ||
destination: "ambient-artifacts/ambient-web-clients/ambient-canary" | ||
parent: false | ||
|
||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
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
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
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.