From 5794f9147a54c1b1fb7f24f25f5eb65a074859ea Mon Sep 17 00:00:00 2001 From: ChrisUser Date: Sun, 3 Dec 2023 16:56:06 +0100 Subject: [PATCH] fix: update docs build script --- .github/workflows/storybook.yml | 44 +++++++++++++++++---------------- package.json | 2 +- src/main.tsx | 2 +- yarn.lock | 9 ------- 4 files changed, 25 insertions(+), 32 deletions(-) diff --git a/.github/workflows/storybook.yml b/.github/workflows/storybook.yml index b963f8a..c06b6c5 100644 --- a/.github/workflows/storybook.yml +++ b/.github/workflows/storybook.yml @@ -1,24 +1,26 @@ name: Build and Deploy on: - push: - paths: ["src/**", ".storybook/**"] # Trigger the action only when files change in the folders defined here + push: + paths: ['src/**', '.storybook/**'] # Trigger the action only when files change in the folders defined here jobs: - build-and-deploy: - runs-on: ubuntu-latest - steps: - - name: Checkout 🛎️ - uses: actions/checkout@v3 - with: - persist-credentials: false - - name: Install and Build 🔧 - run: | # Install npm packages and build the Storybook files - npm install --force - npm run build-storybook - - name: Deploy 🚀 - uses: JamesIves/github-pages-deploy-action@v4 - with: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - BRANCH: docs # The branch the action should deploy to. - FOLDER: docs-build # The folder that the build-storybook script generates files. - CLEAN: true # Automatically remove deleted files from the deploy branch - TARGET_FOLDER: docs # The folder that we serve our Storybook files from + build-and-deploy: + runs-on: ubuntu-latest + steps: + - name: Checkout 🛎️ + uses: actions/checkout@v3 + with: + persist-credentials: false + - name: Install and Build 🔧 + run: | # Install npm packages and build the Storybook files + npm install --force + npm run build-storybook + - name: Deploy 🚀 + uses: JamesIves/github-pages-deploy-action@v4 + with: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + BRANCH: docs # The branch the action should deploy to. + FOLDER: docs-build # The folder that the build-storybook script generates files. + CLEAN: true # Automatically remove deleted files from the deploy branch + clean-exclude: | + .nojekyll + TARGET_FOLDER: docs # The folder that we serve our Storybook files from diff --git a/package.json b/package.json index 5ecb55d..26d47be 100644 --- a/package.json +++ b/package.json @@ -20,7 +20,7 @@ "test": "react-scripts test", "prepublishOnly": "yarn build", "storybook": "storybook dev", - "build-storybook": "storybook build -c .storybook -o docs-build .out" + "build-storybook": "storybook build -c .storybook -o docs-build .out && touch ./docs-build/.nojekyll" }, "release": { "branches": [ diff --git a/src/main.tsx b/src/main.tsx index 38eead8..ad19417 100644 --- a/src/main.tsx +++ b/src/main.tsx @@ -28,7 +28,7 @@ const App = () => { ] return ( -
+
diff --git a/yarn.lock b/yarn.lock index 29e3e79..08528ae 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1,15 +1,6 @@ # THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. # yarn lockfile v1 -"@aashutoshrathi/word-wrap@^1.2.3": - version "1.2.6" - resolved "https://registry.yarnpkg.com/@aashutoshrathi/word-wrap/-/word-wrap-1.2.6.tgz#bd9154aec9983f77b3a034ecaa015c2e4201f6cf" - integrity sha512-1Yjs2SvM8TflER/OD3cOjhWWOZb58A2t7wpE2S9XfBYTiIl+XFhQG2bjy4Pu1I+EAlCNUzRDYDdFwFYUKvXcIA== - -"@adobe/css-tools@^4.3.1": - version "4.3.2" - resolved "https://registry.yarnpkg.com/@adobe/css-tools/-/css-tools-4.3.2.tgz#a6abc715fb6884851fca9dad37fc34739a04fd11" - integrity sha512-DA5a1C0gD/pLOvhv33YMrbf2FK3oUzwNl9oOJqE4XVjuEtt6XIakRcsd7eLiOSPkp1kTRQGICTA8cKra/vFbjw== "@ampproject/remapping@^2.2.0": version "2.2.1"