Skip to content

Commit 5794f91

Browse files
committed
fix: update docs build script
1 parent d9acb42 commit 5794f91

File tree

4 files changed

+25
-32
lines changed

4 files changed

+25
-32
lines changed

.github/workflows/storybook.yml

Lines changed: 23 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,26 @@
11
name: Build and Deploy
22
on:
3-
push:
4-
paths: ["src/**", ".storybook/**"] # Trigger the action only when files change in the folders defined here
3+
push:
4+
paths: ['src/**', '.storybook/**'] # Trigger the action only when files change in the folders defined here
55
jobs:
6-
build-and-deploy:
7-
runs-on: ubuntu-latest
8-
steps:
9-
- name: Checkout 🛎️
10-
uses: actions/checkout@v3
11-
with:
12-
persist-credentials: false
13-
- name: Install and Build 🔧
14-
run: | # Install npm packages and build the Storybook files
15-
npm install --force
16-
npm run build-storybook
17-
- name: Deploy 🚀
18-
uses: JamesIves/github-pages-deploy-action@v4
19-
with:
20-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
21-
BRANCH: docs # The branch the action should deploy to.
22-
FOLDER: docs-build # The folder that the build-storybook script generates files.
23-
CLEAN: true # Automatically remove deleted files from the deploy branch
24-
TARGET_FOLDER: docs # The folder that we serve our Storybook files from
6+
build-and-deploy:
7+
runs-on: ubuntu-latest
8+
steps:
9+
- name: Checkout 🛎️
10+
uses: actions/checkout@v3
11+
with:
12+
persist-credentials: false
13+
- name: Install and Build 🔧
14+
run: | # Install npm packages and build the Storybook files
15+
npm install --force
16+
npm run build-storybook
17+
- name: Deploy 🚀
18+
uses: JamesIves/github-pages-deploy-action@v4
19+
with:
20+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
21+
BRANCH: docs # The branch the action should deploy to.
22+
FOLDER: docs-build # The folder that the build-storybook script generates files.
23+
CLEAN: true # Automatically remove deleted files from the deploy branch
24+
clean-exclude: |
25+
.nojekyll
26+
TARGET_FOLDER: docs # The folder that we serve our Storybook files from

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
"test": "react-scripts test",
2121
"prepublishOnly": "yarn build",
2222
"storybook": "storybook dev",
23-
"build-storybook": "storybook build -c .storybook -o docs-build .out"
23+
"build-storybook": "storybook build -c .storybook -o docs-build .out && touch ./docs-build/.nojekyll"
2424
},
2525
"release": {
2626
"branches": [

src/main.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ const App = () => {
2828
]
2929

3030
return (
31-
<div style={{ display: 'flex', justifyContent: 'center', alignItems: 'center', flexDirection: 'column', gap: 32, width: '100%', marginTop: 24 }}>
31+
<div style={{ display: 'flex', justifyContent: 'center', alignItems: 'center', flexDirection: 'column', gap: 32, width: '100%', marginTop: 32 }}>
3232
<div style={{ padding: '24px 0', width: '60%' }}>
3333
<UsageBar showFallbackColors items={itemsToDisplay} total={100} />
3434
</div>

yarn.lock

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,6 @@
11
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
22
# yarn lockfile v1
33

4-
"@aashutoshrathi/word-wrap@^1.2.3":
5-
version "1.2.6"
6-
resolved "https://registry.yarnpkg.com/@aashutoshrathi/word-wrap/-/word-wrap-1.2.6.tgz#bd9154aec9983f77b3a034ecaa015c2e4201f6cf"
7-
integrity sha512-1Yjs2SvM8TflER/OD3cOjhWWOZb58A2t7wpE2S9XfBYTiIl+XFhQG2bjy4Pu1I+EAlCNUzRDYDdFwFYUKvXcIA==
8-
9-
"@adobe/css-tools@^4.3.1":
10-
version "4.3.2"
11-
resolved "https://registry.yarnpkg.com/@adobe/css-tools/-/css-tools-4.3.2.tgz#a6abc715fb6884851fca9dad37fc34739a04fd11"
12-
integrity sha512-DA5a1C0gD/pLOvhv33YMrbf2FK3oUzwNl9oOJqE4XVjuEtt6XIakRcsd7eLiOSPkp1kTRQGICTA8cKra/vFbjw==
134

145
"@ampproject/remapping@^2.2.0":
156
version "2.2.1"

0 commit comments

Comments
 (0)