Skip to content

Commit e30551d

Browse files
committed
ci(documentation): deploy it
1 parent d5ba45e commit e30551d

File tree

4 files changed

+14
-6
lines changed

4 files changed

+14
-6
lines changed

.github/workflows/release.yml

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ jobs:
7979
docs:
8080
runs-on: ubuntu-latest
8181
needs: prepare
82-
name: Publish documentation
82+
name: Documentation
8383

8484
steps:
8585
- name: Checkout code
@@ -103,5 +103,14 @@ jobs:
103103
if: steps.cache-node_modules.outputs.cache-hit != 'true'
104104
run: npm ci
105105

106-
- name: Build
107-
run: npm run deploy:docs
106+
- name: Build storybook
107+
run: npm run build:docs
108+
109+
- name: Deploy
110+
uses: JamesIves/[email protected]
111+
with:
112+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
113+
BRANCH: docs
114+
FOLDER: docs-build
115+
CLEAN: true
116+
TARGET_FOLDER: docs

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,3 +16,4 @@ settings.json
1616
*.code-workspace
1717
yarn.lock
1818
yarn-error.log
19+
docs-build

README.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -294,8 +294,6 @@ $ git clone [email protected]:YourUsername/react-content-loader.git && cd rea
294294

295295
`$ npm run dev`: Run the Storybook to see your changes;
296296

297-
`$ npm run deploy:docs`: Deploy Storybook to the Github pages;
298-
299297
`$ npm run test`: Run all tests: type checking, unit tests on web and native;
300298

301299
`$ npm run test:watch`: Watch unit tests;

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
"scripts": {
3434
"dev": "start-storybook -p 6006",
3535
"build": "rm -fr ./dist ./native && rollup -c && npm run test:size",
36-
"deploy:docs": "storybook-to-ghpages",
36+
"build:docs": "build-storybook -o docs-build",
3737
"test": "npm run test:tsc && npm run test:unit",
3838
"test:unit": "npm run test:unit:web && npm run test:unit:native",
3939
"test:unit:web": "jest -c jest.web.config.js",

0 commit comments

Comments
 (0)