Skip to content

Commit 7461f36

Browse files
committed
chore: 🤖 publish static site
1 parent 53cbadc commit 7461f36

File tree

4 files changed

+51
-5
lines changed

4 files changed

+51
-5
lines changed

‎.github/workflows/gh-pages.yml

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: GitHub Pages
2+
3+
on:
4+
push:
5+
branches: [ master ]
6+
7+
jobs:
8+
gh-pages:
9+
runs-on: ubuntu-latest
10+
strategy:
11+
matrix:
12+
node-version: [20.x]
13+
steps:
14+
- uses: actions/checkout@v4
15+
- name: Use Node.js ${{ matrix.node-version }}
16+
uses: actions/setup-node@v4
17+
with:
18+
node-version: ${{ matrix.node-version }}
19+
cache: yarn
20+
- run: yarn install --frozen-lockfile
21+
- run: yarn typedoc
22+
- run: yarn coverage
23+
- run: yarn build:pages
24+
- name: Publish to gh-pages
25+
uses: peaceiris/actions-gh-pages@v3
26+
with:
27+
github_token: ${{ secrets.GITHUB_TOKEN }}
28+
publish_dir: ./gh-pages

‎.gitignore

+3-2
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,10 @@
22
node_modules
33
/.idea
44
.nyc_output
5-
coverage
5+
/coverage/
66
package-lock.json
77
/lib/
8-
/gh-pages
8+
/gh-pages/
99
/dist
1010
/fs-test/
11+
/typedocs/

‎package.json

+5-2
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@
5252
"scripts": {
5353
"build": "tsc -p . && rimraf --glob lib/__tests__ 'lib/**/__tests__'",
5454
"build:webfs": "NODE_ENV=production webpack --config ./src/webfs/webpack.config.js",
55-
"clean": "rimraf lib types",
55+
"clean": "rimraf lib types typedocs gh-pages coverage",
5656
"demo:crud-and-cas": "webpack serve --config ./demo/crud-and-cas/webpack.config.js",
5757
"demo:fsa-to-node-sync-tests": "webpack serve --config ./demo/fsa-to-node-sync-tests/webpack.config.js",
5858
"demo:fsa-to-node-zipfile": "webpack serve --config ./demo/fsa-to-node-zipfile/webpack.config.js",
@@ -66,7 +66,10 @@
6666
"test:watch": "jest --watch",
6767
"tslint": "tslint \"src/**/*.ts\" -t verbose",
6868
"typecheck": "tsc -p .",
69-
"watch": "watch \"npm run build\" ./src"
69+
"watch": "watch \"npm run build\" ./src",
70+
"coverage": "yarn test --collectCoverage",
71+
"typedoc": "npx [email protected] --tsconfig tsconfig.json",
72+
"build:pages": "npx [email protected] gh-pages && mkdir -p gh-pages && cp -r typedocs/* gh-pages && cp -r coverage gh-pages/coverage"
7073
},
7174
"commitlint": {
7275
"extends": [

‎tsconfig.json

+15-1
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,19 @@
1414
"importHelpers": true
1515
},
1616
"include": ["src"],
17-
"exclude": ["src/__tests__", "node_modules", "lib", "es6", "es2020", "esm", "docs", "README.md"]
17+
"exclude": ["src/__tests__", "node_modules", "lib", "es6", "es2020", "esm", "docs", "README.md"],
18+
"typedocOptions": {
19+
"entryPoints": [
20+
"src/index.ts",
21+
"src/cas/types.ts",
22+
"src/crud/types.ts",
23+
"src/crud-to-cas/index.ts",
24+
"src/fsa/types.ts",
25+
"src/fsa-to-crud/index.ts",
26+
"src/fsa-to-node/index.ts",
27+
"src/node-to-crud/index.ts",
28+
"src/node-to-fsa/index.ts",
29+
],
30+
"out": "typedocs"
31+
}
1832
}

0 commit comments

Comments
 (0)