File tree Expand file tree Collapse file tree 7 files changed +120
-80
lines changed
apps/storybook/.storybook Expand file tree Collapse file tree 7 files changed +120
-80
lines changed Original file line number Diff line number Diff line change 1+ name : ' Setup Workspace'
2+ description : ' Checkout code, setup Node.js with pnpm, and install dependencies'
3+
4+ inputs :
5+ npm-token :
6+ description : ' NPM token for authentication'
7+ required : false
8+
9+ runs :
10+ using : ' composite'
11+ steps :
12+ - uses : actions/checkout@v4
13+ with :
14+ fetch-depth : 0
15+ persist-credentials : false
16+
17+ - uses : pnpm/action-setup@v4
18+
19+ - uses : actions/setup-node@v4
20+ env :
21+ NODE_AUTH_TOKEN : ${{ inputs.npm-token }}
22+ with :
23+ node-version-file : package.json
24+ cache : " pnpm"
25+ always-auth : " true"
26+ scope : " @plextv"
27+ registry-url : " https://registry.npmjs.org"
28+
29+ - name : Install dependencies
30+ run : pnpm install --frozen-lockfile
31+ shell : bash
Original file line number Diff line number Diff line change 1+ name : Deploy Storybook
2+
3+ on :
4+ workflow_dispatch :
5+ push :
6+ branches :
7+ - main
8+
9+ concurrency : ${{ github.workflow }}-${{ github.ref }}
10+
11+ permissions :
12+ pages : write # to deploy to Pages
13+ id-token : write
14+
15+ jobs :
16+ build-and-deploy :
17+ name : Build and Deploy Storybook
18+ runs-on : ubuntu-latest
19+ if : ${{ github.event_name == 'push' || github.event_name == 'workflow_dispatch' }}
20+
21+ environment :
22+ name : github-pages
23+ url : ${{ steps.deployment.outputs.page_url }}
24+
25+ steps :
26+ - name : Setup workspace
27+ uses : plexinc/react-lightning/.github/actions/setup@main
28+ with :
29+ npm-token : ${{ secrets.NPM_TOKEN }}
30+
31+ - name : Build Storybook
32+ run : pnpm run build:storybook
33+
34+ - name : Upload storybook static files as artifact
35+ uses : actions/upload-pages-artifact@v3
36+ with :
37+ path : apps/storybook/dist/
38+
39+ - name : Deploy to GitHub Pages
40+ id : deployment
41+ uses : actions/deploy-pages@v4
Original file line number Diff line number Diff line change 1+ name : Release Packages
2+
3+ on :
4+ workflow_dispatch :
5+ workflow_run :
6+ workflows : ["Run tests"]
7+ branches : [main]
8+ types :
9+ - completed
10+
11+ concurrency : ${{ github.workflow }}-${{ github.ref }}
12+
13+ permissions :
14+ id-token : write
15+
16+ jobs :
17+ release :
18+ name : Release Packages
19+ runs-on : ubuntu-latest
20+ if : ${{ github.event.workflow_run.conclusion == 'success' || github.event_name == 'workflow_dispatch' }}
21+
22+ outputs :
23+ published : ${{ steps.changesets.outputs.published }}
24+
25+ steps :
26+ - name : Setup workspace
27+ uses : plexinc/react-lightning/.github/actions/setup@main
28+ with :
29+ npm-token : ${{ secrets.NPM_TOKEN }}
30+
31+ - name : Create release pull request or publish
32+ id : changesets
33+ uses : changesets/action@v1
34+ with :
35+ version : pnpm run ci:version
36+ commit : " chore: Update versions"
37+ title : " chore: Update versions"
38+ publish : pnpm run ci:publish
39+ env :
40+ # When you use the repository's GITHUB_TOKEN to perform tasks, events
41+ # triggered by the GITHUB_TOKEN will not create a new workflow run.
42+ # This means that checks won't run on the release PRs. We work around
43+ # this by using our own GH_TOKEN_REPO_ACCESS organization secret.
44+ GITHUB_TOKEN : ${{ secrets.GH_TOKEN_REPO_ACCESS }}
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 77 push :
88 branches :
99 - main
10+ workflow_dispatch :
1011
1112concurrency :
1213 group : ${{ github.workflow }}-${{ github.head_ref || github.ref }}
Original file line number Diff line number Diff line change @@ -15,6 +15,8 @@ const config: StorybookConfig = {
1515 options : { } ,
1616 } ,
1717 viteFinal ( config ) {
18+ config . base = './' ;
19+
1820 config . define = {
1921 __DEV__ : JSON . stringify (
2022 ( config . mode ?? process . env . NODE_ENV ) !== 'production' ,
Original file line number Diff line number Diff line change 1414 "type" : " module" ,
1515 "scripts" : {
1616 "build" : " turbo build" ,
17+ "build:storybook" : " pnpm run build --filter=@plextv/react-lightning-storybook" ,
1718 "build:types" : " turbo build:types" ,
1819 "check:types" : " turbo check:types" ,
1920 "clean" : " turbo clean" ,
You can’t perform that action at this time.
0 commit comments