-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: firebase config for storybook ui
Adds a deploy workflow for the new storybook ui static site, deploying to: * preview.ui.penumbra.zone, on merge to main * ui.penumbra.zone, on tag push Additionally, PRs will have an ephemeral URL for preview posted to them via a bot as a comment, so unmerged work can be viewed in an online context.
- Loading branch information
Showing
5 changed files
with
139 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
# Deploys the static website for the UI storybook to "preview" environment, | ||
# on every merge into main branch. | ||
name: Deploy UI to preview | ||
on: | ||
workflow_dispatch: | ||
push: | ||
branches: | ||
- main | ||
jobs: | ||
build_and_deploy: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- uses: pnpm/action-setup@v4 | ||
|
||
- name: Install dependencies | ||
run: pnpm install | ||
working-directory: packages/ui | ||
|
||
- name: Build static site | ||
run: pnpm build-storybook | ||
working-directory: packages/ui | ||
|
||
- uses: FirebaseExtended/action-hosting-deploy@v0 | ||
working-directory: packages/ui | ||
with: | ||
repoToken: ${{ secrets.GITHUB_TOKEN }} | ||
firebaseServiceAccount: ${{ secrets.FIREBASE_SERVICE_ACCOUNT_PENUMBRA_UI }} | ||
channelId: live | ||
target: preview | ||
projectId: penumbra-ui |
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,33 @@ | ||
# Deploys the static website for the UI storybook to a temporary environment, | ||
# with an ephemeral URL posted to the PR for sharing/review. | ||
name: Deploy UI to temporary URL | ||
on: | ||
workflow_dispatch: | ||
pull_request: | ||
permissions: | ||
checks: write | ||
contents: read | ||
pull-requests: write | ||
jobs: | ||
build_and_preview: | ||
if: ${{ github.event.pull_request.head.repo.full_name == github.repository }} | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- uses: pnpm/action-setup@v4 | ||
|
||
- name: Install dependencies | ||
run: pnpm install | ||
working-directory: packages/ui | ||
|
||
- name: Build static site | ||
run: pnpm build-storybook | ||
working-directory: packages/ui | ||
|
||
- uses: FirebaseExtended/action-hosting-deploy@v0 | ||
with: | ||
repoToken: ${{ secrets.GITHUB_TOKEN }} | ||
firebaseServiceAccount: ${{ secrets.FIREBASE_SERVICE_ACCOUNT_PENUMBRA_UI }} | ||
target: preview | ||
projectId: penumbra-ui |
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,33 @@ | ||
# Deploys the static website for the UI storybook to final prod website, | ||
# on every tag push into main branch. | ||
name: Deploy UI to stable channel | ||
on: | ||
# Support ad-hoc runs | ||
workflow_dispatch: | ||
# Run automatically on tag push | ||
push: | ||
tags: | ||
- '**[0-9]+.[0-9]+.[0-9]+*' | ||
jobs: | ||
build_and_deploy: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- uses: pnpm/action-setup@v4 | ||
|
||
- name: Install dependencies | ||
run: pnpm install | ||
working-directory: packages/ui | ||
|
||
- name: Build static site | ||
run: pnpm build-storybook | ||
working-directory: packages/ui | ||
|
||
- uses: FirebaseExtended/action-hosting-deploy@v0 | ||
with: | ||
repoToken: ${{ secrets.GITHUB_TOKEN }} | ||
firebaseServiceAccount: ${{ secrets.FIREBASE_SERVICE_ACCOUNT_PENUMBRA_UI }} | ||
channelId: live | ||
target: stable | ||
projectId: penumbra-ui |
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,19 @@ | ||
{ | ||
"projects": { | ||
"default": "penumbra-ui" | ||
}, | ||
"targets": { | ||
"penumbra-ui": { | ||
"hosting": { | ||
"preview": [ | ||
"penumbra-ui-preview" | ||
], | ||
"stable": [ | ||
"penumbra-ui" | ||
] | ||
} | ||
} | ||
}, | ||
"etags": {}, | ||
"dataconnectEmulatorConfig": {} | ||
} |
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,22 @@ | ||
{ | ||
"hosting": [ | ||
{ | ||
"target": "preview", | ||
"public": "storybook-static", | ||
"ignore": [ | ||
"firebase.json", | ||
"**/.*", | ||
"**/node_modules/**" | ||
] | ||
}, | ||
{ | ||
"target": "stable", | ||
"public": "storybook-static", | ||
"ignore": [ | ||
"firebase.json", | ||
"**/.*", | ||
"**/node_modules/**" | ||
] | ||
} | ||
] | ||
} |