Skip to content

Commit

Permalink
feat: publish generated docs to gh pages
Browse files Browse the repository at this point in the history
  • Loading branch information
farhat-ha committed Oct 10, 2024
1 parent 8ac1d8c commit ada595a
Show file tree
Hide file tree
Showing 3 changed files with 55 additions and 0 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/publish-gh-pages.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: publish-gh-pages

on:
pull_request:
workflow_dispatch:

jobs:
build_and_lint:
runs-on: ubuntu-latest
steps:
- name: Checkout the repository
uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version-file: ".nvmrc"
cache: "yarn"

- name: Install dependencies
run: yarn install --immutable

- name: Create the docs directory locally in CI
working-directory: packages/js
run: yarn docs:html

- name: Deploy 🚀
uses: JamesIves/github-pages-deploy-action@v4
with:
branch: gh-pages
folder: packages/js/docs
1 change: 1 addition & 0 deletions packages/js/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
"prepare": "yarn build",
"test": "jest",
"docs": "typedoc --entryPointStrategy expand ./src",
"docs:html": "typedoc --entryPointStrategy expand --options typedoc.html.json ./src",
"release": "release-it",
"compile": "../../node_modules/.bin/tsc -w",
"format": "prettier --write 'src/**/*.ts'",
Expand Down
23 changes: 23 additions & 0 deletions packages/js/typedoc.html.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"out": "./docs/ts",
"entryPoints": ["./src/index.ts"],
"exclude": [
"**/*+(test|index).ts",
"src/Modules/Verto/messages/**/*",
"src/Modules/Verto/services/**/*",
"src/Modules/Verto/tests/**/*",
"src/Modules/Verto/util/**/*"
],
"plugin": ["typedoc-plugin-merge-modules"],
"excludeExternals": true,
"excludePrivate": true,
"excludeProtected": true,
"excludeNotDocumented": true,
"githubPages": true,
"excludeTags": ["@internalnote", "@internal"],
"cleanOutputDir": true,
"hideGenerator": true,
"readme": "none",
"gitRevision": "main",
"disableSources": true
}

0 comments on commit ada595a

Please sign in to comment.