Skip to content
Open
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
70 changes: 70 additions & 0 deletions .github/workflows/publish-docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
# SPDX-FileCopyrightText: 2025 LiveKit, Inc.
#
# SPDX-License-Identifier: Apache-2.0

name: Publish Docs
permissions:
contents: read

on:
workflow_dispatch:
Copy link
Contributor

Choose a reason for hiding this comment

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

this looks like triggering publishing of docs is exclusively a manual process.

It would be great if we could automate it as part of the release workflow, i.e. if a package got published, also publish the latest docs, so that the docs are always up to date with the latest release without us having to remember explicitly publishing the docs.

inputs:
livekit-rtc:
description: "Build and deploy docs for livekit-rtc"
required: false
default: true
type: boolean
livekit-server-sdk:
description: "Build and deploy docs for livekit-server-sdk"
required: false
default: true
type: boolean

concurrency: ${{ github.workflow }}-${{ github.ref }}

jobs:
build:
name: Build docs and publish to S3
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
lfs: true
- uses: pnpm/action-setup@v4
- name: Use Node.js 20
uses: actions/setup-node@v4
with:
node-version: 20
cache: pnpm
- name: Install dependencies
run: pnpm install --frozen-lockfile

- name: Build docs for livekit-rtc
if: ${{ github.event.inputs.livekit-rtc }}
run: |
cd packages/livekit-rtc
pnpm build:docs

- name: Build docs for livekit-server-sdk
if: ${{ github.event.inputs.livekit-server-sdk }}
run: |
cd packages/livekit-server-sdk
pnpm build:docs

- name: Upload livekit-rtc docs to S3
if: ${{ github.event.inputs.livekit-rtc }}
run: |
aws s3 cp packages/livekit-rtc/docs/ s3://livekit-docs/rtc-node --recursive
env:
AWS_ACCESS_KEY_ID: ${{ secrets.DOCS_DEPLOY_AWS_ACCESS_KEY }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.DOCS_DEPLOY_AWS_API_SECRET }}
AWS_DEFAULT_REGION: "us-east-1"

- name: Upload livekit-server-sdk docs to S3
if: ${{ github.event.inputs.livekit-server-sdk }}
run: |
aws s3 cp packages/livekit-server-sdk/docs/ s3://livekit-docs/server-sdk-js --recursive
env:
AWS_ACCESS_KEY_ID: ${{ secrets.DOCS_DEPLOY_AWS_ACCESS_KEY }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.DOCS_DEPLOY_AWS_API_SECRET }}
AWS_DEFAULT_REGION: "us-east-1"
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@
"eslint-plugin-tsdoc": "^0.4.0",
"prettier": "^3.2.5",
"turbo": "^2.0.0",
"typescript": "5.8.2",
"typedoc": "catalog:",
"typescript": "catalog:",
"vitest": "^3.0.0"
},
"packageManager": "[email protected]"
Expand Down
10 changes: 6 additions & 4 deletions packages/livekit-rtc/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,16 +49,17 @@
"@bufbuild/protobuf": "^1.10.1",
"@livekit/mutex": "^1.0.0",
"@livekit/typed-emitter": "^3.0.0",
"pino": "^9.0.0",
"pino-pretty": "^13.0.0"
"pino": "^9.9.0",
"pino-pretty": "^13.1.1"
},
"devDependencies": {
"@bufbuild/protoc-gen-es": "^1.10.1",
"@napi-rs/cli": "^2.18.0",
"@types/node": "^22.13.10",
"prettier": "^3.0.3",
"tsup": "^8.3.5",
"typescript": "5.8.2",
"@bufbuild/protoc-gen-es": "^1.10.1"
"typedoc": "catalog:",
"typescript": "catalog:"
},
"optionalDependencies": {
"@livekit/rtc-node-darwin-arm64": "workspace:*",
Expand All @@ -74,6 +75,7 @@
"prebuild": "node -p \"'export const SDK_VERSION = ' + JSON.stringify(require('./package.json').version) + ';'\" > src/version.ts",
"build:ts": "pnpm prebuild && tsup --onSuccess \"tsc --declaration --emitDeclarationOnly\" && cp -r src/napi dist/ && cp -r src/napi/* dist/",
"build": "pnpm build:ts && napi build --platform --release --dts native.d.ts --js native.cjs --pipe \"prettier -w\" src/napi",
"build:docs": "typedoc",
"artifacts": "pnpm build:ts && napi artifacts",
"build:debug": "napi build --platform",
"lint": "eslint -f unix \"src/**/*.ts\" --ignore-pattern \"src/proto/*\"",
Expand Down
5 changes: 3 additions & 2 deletions packages/livekit-server-sdk/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
"scripts": {
"build": "tsup --onSuccess \"tsc --declaration --emitDeclarationOnly\"",
"build:watch": "tsc --watch",
"build-docs": "typedoc",
"build:docs": "typedoc",
"changeset": "changeset",
"ci:publish": "pnpm build && changeset publish",
"lint": "eslint src",
Expand All @@ -55,8 +55,9 @@
"happy-dom": "^17.0.0",
"prettier": "^3.0.0",
"tsup": "^8.3.5",
"typedoc": "catalog:",
"typedoc": "^0.28.0",
"typescript": "5.8.2",
"typescript": "catalog:",
"vite": "^5.2.9",
"vitest": "^3.0.0"
},
Expand Down
57 changes: 39 additions & 18 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions pnpm-workspace.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,7 @@ packages:
- 'examples/*'
- 'packages/*'
- 'packages/livekit-rtc/npm/*'

catalog:
"typedoc": ^0.28.11
"typescript": 5.8.2
Loading