Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: publish generated docs to gh pages #385

Merged
merged 1 commit into from
Oct 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 33 additions & 0 deletions .github/workflows/publish-gh-pages.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: publish-gh-pages

on:
push:
branches:
- main
workflow_dispatch:

jobs:
build_and_lint:
runs-on: ubuntu-latest
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we are using telnyx machines to run github actions, like telnyx-4xlarge. Not sure if we should follow this or it is fine to use ubuntu if we don't need access to any of the env vars

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
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
}
Loading