Skip to content

Commit 45bb49b

Browse files
authored
fix(deps): storybook v9 (#1476)
<!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Chores** * Upgraded Storybook and related dependencies to the latest major version. * Updated Storybook configuration and removed deprecated addons. * Added Storybook linting plugin to the development environment. * Added deployment scripts and configuration for Storybook to Cloudflare Workers. * Introduced GitHub Actions workflow for automated Storybook deployment to staging and production environments. * Enhanced environment variable loading to suppress output in production and non-development environments. * **Refactor** * Updated all Storybook stories to use the new Storybook package imports and consistent single-quote formatting. * Improved ESLint configuration formatting and included recommended Storybook linting rules. * **Style** * Standardized import statements and string quotes across all Storybook story files for consistency. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
1 parent 06578fc commit 45bb49b

32 files changed

+1161
-601
lines changed
Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
name: Deploy Storybook to Cloudflare Workers
2+
permissions:
3+
contents: read
4+
pull-requests: write
5+
issues: write
6+
on:
7+
push:
8+
branches:
9+
- main
10+
paths:
11+
- 'unraid-ui/**'
12+
pull_request:
13+
paths:
14+
- 'unraid-ui/**'
15+
workflow_dispatch:
16+
17+
jobs:
18+
deploy:
19+
runs-on: ubuntu-latest
20+
name: Deploy Storybook
21+
steps:
22+
- name: Checkout
23+
uses: actions/checkout@v4
24+
25+
- name: Setup Node.js
26+
uses: actions/setup-node@v4
27+
with:
28+
node-version: '20'
29+
30+
- uses: pnpm/action-setup@v4
31+
name: Install pnpm
32+
with:
33+
run_install: false
34+
35+
- name: Cache APT Packages
36+
uses: awalsh128/cache-apt-pkgs-action@v1.4.3
37+
with:
38+
packages: bash procps python3 libvirt-dev jq zstd git build-essential libvirt-daemon-system
39+
version: 1.0
40+
41+
- name: Install dependencies
42+
run: pnpm install --frozen-lockfile
43+
44+
- name: Build Storybook
45+
run: |
46+
cd unraid-ui
47+
pnpm build-storybook
48+
49+
- name: Deploy to Cloudflare Workers (Staging)
50+
id: deploy_staging
51+
if: github.event_name == 'pull_request'
52+
uses: cloudflare/wrangler-action@v3
53+
with:
54+
apiToken: ${{ secrets.CLOUDFLARE_DEPLOY_TOKEN }}
55+
command: deploy --env staging
56+
workingDirectory: unraid-ui
57+
58+
- name: Deploy to Cloudflare Workers (Production)
59+
if: github.ref == 'refs/heads/main' && github.event_name == 'push'
60+
uses: cloudflare/wrangler-action@v3
61+
with:
62+
apiToken: ${{ secrets.CLOUDFLARE_DEPLOY_TOKEN }}
63+
command: deploy
64+
workingDirectory: unraid-ui
65+
66+
- name: Comment PR with deployment URL
67+
if: github.event_name == 'pull_request'
68+
uses: actions/github-script@v7
69+
with:
70+
script: |
71+
github.rest.issues.createComment({
72+
issue_number: context.issue.number,
73+
owner: context.repo.owner,
74+
repo: context.repo.repo,
75+
body: `🚀 Storybook has been deployed to staging: ${{ steps.deploy_staging.outputs['deployment-url'] }}`
76+
})

api/src/dotenv.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ const env =
99
override: true,
1010
})
1111
: config({
12+
debug: false,
13+
quiet: true,
1214
path: '/usr/local/unraid-api/.env',
1315
encoding: 'utf-8',
1416
});

0 commit comments

Comments
 (0)