File tree Expand file tree Collapse file tree 8 files changed +126
-82
lines changed Expand file tree Collapse file tree 8 files changed +126
-82
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 7
7
push :
8
8
branches :
9
9
- main
10
+ workflow_dispatch :
10
11
11
12
concurrency :
12
13
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 = {
15
15
options : { } ,
16
16
} ,
17
17
viteFinal ( config ) {
18
+ config . base = './' ;
19
+
18
20
config . define = {
19
21
__DEV__ : JSON . stringify (
20
22
( config . mode ?? process . env . NODE_ENV ) !== 'production' ,
Original file line number Diff line number Diff line change @@ -28,8 +28,12 @@ export function StorybookDecorator({
28
28
new SdfTrFontFace ( 'msdf' , {
29
29
fontFamily : 'sans-serif' ,
30
30
descriptors : { } ,
31
- atlasUrl : '/fonts/ChocolateClassicalSans-Regular.msdf.png' ,
32
- atlasDataUrl : '/fonts/ChocolateClassicalSans-Regular.msdf.json' ,
31
+ atlasUrl :
32
+ import . meta. env . BASE_URL +
33
+ 'fonts/ChocolateClassicalSans-Regular.msdf.png' ,
34
+ atlasDataUrl :
35
+ import . meta. env . BASE_URL +
36
+ 'fonts/ChocolateClassicalSans-Regular.msdf.json' ,
33
37
stage,
34
38
} ) ,
35
39
] ,
Original file line number Diff line number Diff line change 14
14
"type" : " module" ,
15
15
"scripts" : {
16
16
"build" : " turbo build" ,
17
+ "build:storybook" : " pnpm run build --filter=@plextv/react-lightning-storybook" ,
17
18
"build:types" : " turbo build:types" ,
18
19
"check:types" : " turbo check:types" ,
19
20
"clean" : " turbo clean" ,
You can’t perform that action at this time.
0 commit comments