Skip to content

Commit 57aec79

Browse files
committed
Improve github action jobs
1 parent e36ccc4 commit 57aec79

File tree

3 files changed

+4
-8
lines changed

3 files changed

+4
-8
lines changed

.github/workflows/gh-pages.yml

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,7 @@ jobs:
1616
- name: Test
1717
run: yarn test
1818
- name: Build
19-
run: yarn build
20-
- name: Generate document
21-
run: yarn document:publish
22-
- name: Minify
23-
run: yarn minify
19+
run: yarn build:gh-pages
2420
- name: Deploy
2521
uses: peaceiris/actions-gh-pages@v3
2622
with:

.github/workflows/npm.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
- name: Test
1717
run: yarn test
1818
- name: Build
19-
run: yarn build
19+
run: yarn build:npm
2020
- name: Publish
2121
run: npm publish
2222
env:

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@
1111
"minify": "find . -name \\*.js | grep -E '^./(lib|js)' | xargs -I% npx terser -c -m -o % %",
1212
"test": "NODE_OPTIONS=--experimental-vm-modules npx jest --coverage",
1313
"document": "documentation build lib -f html -o docs",
14-
"document:publish": "yarn document && sed -i -e /^doc/d .gitignore",
15-
"build": "node ./create_import_list.js"
14+
"build:gh-pages": "node ./create_import_list.js && yarn document && sed -i -e /^doc/d .gitignore && yarn minify",
15+
"build:npm": "node ./create_import_list.js"
1616
},
1717
"repository": {
1818
"type": "git",

0 commit comments

Comments
 (0)