Skip to content

Commit

Permalink
chore: 🤖 publish static site
Browse files Browse the repository at this point in the history
  • Loading branch information
streamich committed Apr 27, 2024
1 parent 53cbadc commit 7461f36
Show file tree
Hide file tree
Showing 4 changed files with 51 additions and 5 deletions.
28 changes: 28 additions & 0 deletions .github/workflows/gh-pages.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: GitHub Pages

on:
push:
branches: [ master ]

jobs:
gh-pages:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [20.x]
steps:
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: yarn
- run: yarn install --frozen-lockfile
- run: yarn typedoc
- run: yarn coverage
- run: yarn build:pages
- name: Publish to gh-pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./gh-pages
5 changes: 3 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@
node_modules
/.idea
.nyc_output
coverage
/coverage/
package-lock.json
/lib/
/gh-pages
/gh-pages/
/dist
/fs-test/
/typedocs/
7 changes: 5 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
"scripts": {
"build": "tsc -p . && rimraf --glob lib/__tests__ 'lib/**/__tests__'",
"build:webfs": "NODE_ENV=production webpack --config ./src/webfs/webpack.config.js",
"clean": "rimraf lib types",
"clean": "rimraf lib types typedocs gh-pages coverage",
"demo:crud-and-cas": "webpack serve --config ./demo/crud-and-cas/webpack.config.js",
"demo:fsa-to-node-sync-tests": "webpack serve --config ./demo/fsa-to-node-sync-tests/webpack.config.js",
"demo:fsa-to-node-zipfile": "webpack serve --config ./demo/fsa-to-node-zipfile/webpack.config.js",
Expand All @@ -66,7 +66,10 @@
"test:watch": "jest --watch",
"tslint": "tslint \"src/**/*.ts\" -t verbose",
"typecheck": "tsc -p .",
"watch": "watch \"npm run build\" ./src"
"watch": "watch \"npm run build\" ./src",
"coverage": "yarn test --collectCoverage",
"typedoc": "npx typedoc@0.25.13 --tsconfig tsconfig.json",
"build:pages": "npx rimraf@5.0.5 gh-pages && mkdir -p gh-pages && cp -r typedocs/* gh-pages && cp -r coverage gh-pages/coverage"
},
"commitlint": {
"extends": [
Expand Down
16 changes: 15 additions & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,19 @@
"importHelpers": true
},
"include": ["src"],
"exclude": ["src/__tests__", "node_modules", "lib", "es6", "es2020", "esm", "docs", "README.md"]
"exclude": ["src/__tests__", "node_modules", "lib", "es6", "es2020", "esm", "docs", "README.md"],
"typedocOptions": {
"entryPoints": [
"src/index.ts",
"src/cas/types.ts",
"src/crud/types.ts",
"src/crud-to-cas/index.ts",
"src/fsa/types.ts",
"src/fsa-to-crud/index.ts",
"src/fsa-to-node/index.ts",
"src/node-to-crud/index.ts",
"src/node-to-fsa/index.ts",
],
"out": "typedocs"
}
}

0 comments on commit 7461f36

Please sign in to comment.