From 7af854b9566aaf8adceb2a9f4c0e11470caebce3 Mon Sep 17 00:00:00 2001 From: Jason Desrosiers Date: Sun, 9 Feb 2025 18:51:34 -0800 Subject: [PATCH] Add typedoc --- .github/workflows/docs.yml | 31 +++++++++++++++++++++++++++++++ .github/workflows/nodejs.yml | 1 + .gitignore | 2 ++ package.json | 2 ++ 4 files changed, 36 insertions(+) create mode 100644 .github/workflows/docs.yml diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml new file mode 100644 index 0000000..a80316e --- /dev/null +++ b/.github/workflows/docs.yml @@ -0,0 +1,31 @@ +name: Deploy Documentation + +on: + workflow_dispatch: + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + with: + node-version: lts/* + - run: npm install + - run: npm run docs + - uses: actions/configure-pages@v5 + - uses: actions/upload-pages-artifact@v3 + with: + path: './docs' + deploy: + needs: build + permissions: + pages: write + id-token: write + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + runs-on: ubuntu-latest + steps: + - uses: actions/deploy-pages@v4 + id: deployment diff --git a/.github/workflows/nodejs.yml b/.github/workflows/nodejs.yml index d147ae2..826619b 100644 --- a/.github/workflows/nodejs.yml +++ b/.github/workflows/nodejs.yml @@ -16,3 +16,4 @@ jobs: - run: npm test - run: npm run lint - run: npm run type-check + - run: npm run docs diff --git a/.gitignore b/.gitignore index fa70c18..c96d5f1 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,7 @@ node_modules/ package-lock.json +docs/ + scratch/ TODO* diff --git a/package.json b/package.json index cf724fc..3de34c1 100644 --- a/package.json +++ b/package.json @@ -31,6 +31,7 @@ "test": "vitest --watch=false", "coverage": "vitest run --coverage", "type-check": "tsc --noEmit", + "docs": "typedoc", "prepack": "tsc --project tsconfig.build.json", "postpack": "node ./bin/postpack.js" }, @@ -44,6 +45,7 @@ "@typescript-eslint/parser": "*", "eslint-import-resolver-typescript": "*", "eslint-plugin-import": "*", + "typedoc": "^0.27.6", "typescript-eslint": "*", "undici": "^7.3.0", "vitest": "*"