diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml new file mode 100644 index 0000000..75b131a --- /dev/null +++ b/.github/workflows/docs.yml @@ -0,0 +1,34 @@ +name: Deploy Documentation + +on: + push: + tags: + - "v*.*.*" + 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": "*"