-
Notifications
You must be signed in to change notification settings - Fork 11
fix(deps): storybook v9 #1476
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
fix(deps): storybook v9 #1476
Changes from all commits
0b472c8
9208778
34f9d1d
61b319b
2d17799
9239b70
60c8854
0867408
a48bc00
23eb7c1
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,76 @@ | ||||||||||||||||
| name: Deploy Storybook to Cloudflare Workers | ||||||||||||||||
| permissions: | ||||||||||||||||
| contents: read | ||||||||||||||||
| pull-requests: write | ||||||||||||||||
| issues: write | ||||||||||||||||
|
Comment on lines
+2
to
+5
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🛠️ Refactor suggestion Tighten the GITHUB_TOKEN scope
permissions:
contents: read
- pull-requests: write
issues: write📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||||||||||
| on: | ||||||||||||||||
| push: | ||||||||||||||||
| branches: | ||||||||||||||||
| - main | ||||||||||||||||
| paths: | ||||||||||||||||
| - 'unraid-ui/**' | ||||||||||||||||
| pull_request: | ||||||||||||||||
| paths: | ||||||||||||||||
| - 'unraid-ui/**' | ||||||||||||||||
| workflow_dispatch: | ||||||||||||||||
|
|
||||||||||||||||
| jobs: | ||||||||||||||||
| deploy: | ||||||||||||||||
| runs-on: ubuntu-latest | ||||||||||||||||
| name: Deploy Storybook | ||||||||||||||||
| steps: | ||||||||||||||||
| - name: Checkout | ||||||||||||||||
| uses: actions/checkout@v4 | ||||||||||||||||
|
|
||||||||||||||||
| - name: Setup Node.js | ||||||||||||||||
| uses: actions/setup-node@v4 | ||||||||||||||||
| with: | ||||||||||||||||
| node-version: '20' | ||||||||||||||||
|
|
||||||||||||||||
| - uses: pnpm/action-setup@v4 | ||||||||||||||||
| name: Install pnpm | ||||||||||||||||
| with: | ||||||||||||||||
| run_install: false | ||||||||||||||||
|
|
||||||||||||||||
| - name: Cache APT Packages | ||||||||||||||||
| uses: awalsh128/cache-apt-pkgs-action@v1.4.3 | ||||||||||||||||
| with: | ||||||||||||||||
| packages: bash procps python3 libvirt-dev jq zstd git build-essential libvirt-daemon-system | ||||||||||||||||
| version: 1.0 | ||||||||||||||||
|
|
||||||||||||||||
| - name: Install dependencies | ||||||||||||||||
| run: pnpm install --frozen-lockfile | ||||||||||||||||
|
|
||||||||||||||||
| - name: Build Storybook | ||||||||||||||||
| run: | | ||||||||||||||||
| cd unraid-ui | ||||||||||||||||
| pnpm build-storybook | ||||||||||||||||
|
|
||||||||||||||||
| - name: Deploy to Cloudflare Workers (Staging) | ||||||||||||||||
| id: deploy_staging | ||||||||||||||||
| if: github.event_name == 'pull_request' | ||||||||||||||||
| uses: cloudflare/wrangler-action@v3 | ||||||||||||||||
| with: | ||||||||||||||||
| apiToken: ${{ secrets.CLOUDFLARE_DEPLOY_TOKEN }} | ||||||||||||||||
| command: deploy --env staging | ||||||||||||||||
| workingDirectory: unraid-ui | ||||||||||||||||
|
|
||||||||||||||||
| - name: Deploy to Cloudflare Workers (Production) | ||||||||||||||||
| if: github.ref == 'refs/heads/main' && github.event_name == 'push' | ||||||||||||||||
| uses: cloudflare/wrangler-action@v3 | ||||||||||||||||
| with: | ||||||||||||||||
| apiToken: ${{ secrets.CLOUDFLARE_DEPLOY_TOKEN }} | ||||||||||||||||
| command: deploy | ||||||||||||||||
| workingDirectory: unraid-ui | ||||||||||||||||
|
|
||||||||||||||||
| - name: Comment PR with deployment URL | ||||||||||||||||
| if: github.event_name == 'pull_request' | ||||||||||||||||
| uses: actions/github-script@v7 | ||||||||||||||||
| with: | ||||||||||||||||
| script: | | ||||||||||||||||
| github.rest.issues.createComment({ | ||||||||||||||||
| issue_number: context.issue.number, | ||||||||||||||||
| owner: context.repo.owner, | ||||||||||||||||
| repo: context.repo.repo, | ||||||||||||||||
| body: `🚀 Storybook has been deployed to staging: ${{ steps.deploy_staging.outputs['deployment-url'] }}` | ||||||||||||||||
| }) | ||||||||||||||||
Uh oh!
There was an error while loading. Please reload this page.