-
Notifications
You must be signed in to change notification settings - Fork 673
Storybook Deployment: Add automatic workflows #33570
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
r-farkhutdinov
wants to merge
25
commits into
DevExpress:26_1
Choose a base branch
from
r-farkhutdinov:26_1_sb_deploy_auto
base: 26_1
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+116
−0
Open
Changes from all commits
Commits
Show all changes
25 commits
Select commit
Hold shift + click to select a range
08c30be
Storybook Deployment: Add automatic workflows
3a74902
Storybook Deployment: Fix deploy job permissions & order issues
08a42d5
Update environment name
r-farkhutdinov 8681147
Storybook Deployment: Create meta file after checkout
b6547a4
Storybook Deployment: Add wait-for-pages-deployment flag & add enviro…
7a5bb9e
Storybook Deployment: Replace dawidd6/action-download-artifact with t…
71223f8
Storybook Deployment: Remove environment for build; update ubuntu ver…
d806684
Storybook Deployment: Restore ubuntu version
4750088
Storybook Deployment: Update paths
3d05ebc
Storybook Deployment: Update node version
9c79dee
Restore correct artifacts & meta paths
e1df699
Storybook Deployment: Add summarize step for Deploy; update actions v…
bf115f8
Storybook Deployment: Set runners to ubuntu-slim
a190504
Storybook Deployment: Check label presence in decide action for PR cl…
07fdcd3
Storybook Deployment: Add build run link & build WF summary
353c418
Storybook Deployment: Update GH Pages link & revert ubuntu version
f7aa610
Storybook Deployment: Update environment to storybook
5042180
Storybook Deployment: Restrict forks deployments & merge WFs
1f3d92d
Storybook Deployment: Split to two jobs & add environment to add depl…
9d7a393
Storybook Deployment: Make names static
9f632a6
Storybook Deployment: Add PR number to run name
1f5fed8
Storybook Deployment: Add PR title to run name
335fe77
Storybook Deployment: Update run name
4789259
Storybook Deployment: Add static environment
41512e1
Storybook Deployment: Handle closed re-deploy case & add wait-for-pag…
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or 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,116 @@ | ||
| name: PR Storybook - Preview | ||
| run-name: "PR #${{ github.event.pull_request.number }}: ${{ github.event.pull_request.title }}" | ||
|
|
||
| on: | ||
| pull_request: | ||
| branches: | ||
| - 26_1 | ||
| types: | ||
| - opened | ||
| - reopened | ||
| - synchronize | ||
| - labeled | ||
| - unlabeled | ||
| - closed | ||
|
|
||
| permissions: | ||
| contents: write | ||
|
|
||
| concurrency: | ||
| group: preview-${{ github.event.pull_request.number }} | ||
| cancel-in-progress: true | ||
|
|
||
|
r-farkhutdinov marked this conversation as resolved.
r-farkhutdinov marked this conversation as resolved.
|
||
| env: | ||
| SOURCE_DIR: ./apps/react-storybook/storybook-static | ||
|
|
||
|
r-farkhutdinov marked this conversation as resolved.
|
||
| jobs: | ||
| deploy: | ||
| name: Build & Deploy | ||
| runs-on: ubuntu-latest | ||
| timeout-minutes: 20 | ||
| if: >- | ||
| github.event.pull_request.head.repo.full_name == github.repository && | ||
| ( | ||
| (github.event.action == 'labeled' && github.event.label.name == 'storybook') || | ||
| (github.event.action != 'labeled' && github.event.action != 'closed' && contains(github.event.pull_request.labels.*.name, 'storybook')) | ||
| ) | ||
| environment: | ||
| name: storybook | ||
| url: https://devexpress.github.io/DevExtreme/preview/pr-${{ github.event.pull_request.number }} | ||
|
|
||
| steps: | ||
| - name: Checkout repository | ||
| uses: actions/checkout@v6 | ||
| with: | ||
| submodules: true | ||
| fetch-depth: 1 | ||
|
|
||
| - name: Use Node.js | ||
| uses: actions/setup-node@v6 | ||
| with: | ||
| node-version-file: '.node-version' | ||
|
|
||
| - name: Setup pnpm | ||
| uses: pnpm/action-setup@v6 | ||
| with: | ||
| run_install: false | ||
|
|
||
| - name: Get pnpm store directory | ||
| shell: bash | ||
| run: | | ||
| echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV | ||
|
|
||
| - name: Setup pnpm + nx cache | ||
| uses: actions/cache@v5 | ||
| with: | ||
| path: | | ||
| ${{ env.STORE_PATH }} | ||
| .nx/cache | ||
| key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} | ||
| restore-keys: | | ||
| ${{ runner.os }}-pnpm-store | ||
|
|
||
| - name: Install dependencies | ||
| run: pnpm install --frozen-lockfile | ||
|
|
||
| - name: Build Storybook preview (static) | ||
| run: pnpm nx build devextreme-react-storybook | ||
|
|
||
| - name: Deploy PR preview | ||
| uses: rossjrw/pr-preview-action@ffa7509e91a3ec8dfc2e5536c4d5c1acdf7a6de9 # v1.8.1 | ||
| with: | ||
| action: deploy | ||
| pr-number: ${{ github.event.pull_request.number }} | ||
| source-dir: ${{ env.SOURCE_DIR }} | ||
| preview-branch: gh-pages | ||
| umbrella-dir: preview | ||
| comment: false | ||
| token: ${{ github.token }} | ||
| wait-for-pages-deployment: true | ||
|
|
||
| remove: | ||
| name: Remove preview | ||
| runs-on: ubuntu-latest | ||
| timeout-minutes: 10 | ||
| if: >- | ||
| github.event.pull_request.head.repo.full_name == github.repository && | ||
| ( | ||
| (github.event.action == 'closed' && contains(github.event.pull_request.labels.*.name, 'storybook')) || | ||
| (github.event.action == 'unlabeled' && github.event.label.name == 'storybook') | ||
| ) | ||
|
|
||
| steps: | ||
| - name: Checkout repository | ||
| uses: actions/checkout@v6 | ||
|
|
||
| - name: Remove PR preview | ||
| uses: rossjrw/pr-preview-action@ffa7509e91a3ec8dfc2e5536c4d5c1acdf7a6de9 # v1.8.1 | ||
| with: | ||
| action: remove | ||
| pr-number: ${{ github.event.pull_request.number }} | ||
| source-dir: ${{ env.SOURCE_DIR }} | ||
| preview-branch: gh-pages | ||
| umbrella-dir: preview | ||
| comment: false | ||
| token: ${{ github.token }} | ||
| wait-for-pages-deployment: true | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.