diff --git a/.github/workflows/publish-gh-pages.yml b/.github/workflows/publish-gh-pages.yml new file mode 100644 index 00000000..00686dd8 --- /dev/null +++ b/.github/workflows/publish-gh-pages.yml @@ -0,0 +1,33 @@ +name: publish-gh-pages + +on: + push: + branches: + - main + 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/ts diff --git a/packages/js/package.json b/packages/js/package.json index 3160ea89..25e0897b 100644 --- a/packages/js/package.json +++ b/packages/js/package.json @@ -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'", diff --git a/packages/js/typedoc.html.json b/packages/js/typedoc.html.json new file mode 100644 index 00000000..b5bb5d5c --- /dev/null +++ b/packages/js/typedoc.html.json @@ -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 +}