generated from cloudoperators/repository-template
-
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.
feat(workflows): Storybook pr preview on github pages (#183)
* correct runs-on target * renamings * preview storybook PRs * trigger changes on ui-components * just trigger if ui-componets have changed * test new colors in pr preview * fix file colors * revert changes. There were just to check. * ignore checks or deploy PRs if just markdown files are touched * add new line * do not run checks for github checks * remove test * add colons * add new line * move this change to a different pr * ignore github after changing settings * move to another pr
- Loading branch information
Showing
4 changed files
with
52 additions
and
10 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
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,42 @@ | ||
name: Storybook PR Preview | ||
|
||
on: | ||
pull_request: | ||
types: | ||
- opened | ||
- reopened | ||
- synchronize | ||
- closed | ||
paths: | ||
- "packages/ui-components/**" | ||
# The paths-ignore option only prevents the workflow from running if all the changed files match the ignore patterns | ||
paths-ignore: | ||
- '**.md' | ||
|
||
# Limit the concurrency of entire workflow | ||
concurrency: deploy-pr-preview-${{ github.ref }} | ||
|
||
jobs: | ||
deploy-preview: | ||
runs-on: [default] | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version: "20.x" | ||
|
||
- name: Install dependencies | ||
if: github.event.action != 'closed' | ||
run: | | ||
npm install --force | ||
- name: Build storybook | ||
run: npm -w @cloudoperators/juno-ui-components run build-storybook | ||
|
||
- uses: rossjrw/pr-preview-action@v1 | ||
with: | ||
source-dir: packages/ui-components/storybook-static | ||
preview-branch: gh-pages | ||
umbrella-dir: pr-preview | ||
action: auto |
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