diff --git a/.github/workflows/api-docs.yml b/.github/workflows/api-docs.yml new file mode 100644 index 00000000..baff842b --- /dev/null +++ b/.github/workflows/api-docs.yml @@ -0,0 +1,46 @@ +name: API docs + +on: + push: + branches: [ "main" ] + workflow_dispatch: + +permissions: + contents: read + pages: write + id-token: write + +concurrency: + group: "pages" + cancel-in-progress: false + +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Setup Node + uses: actions/setup-node@v4 + with: + node-version: "20" + cache: "npm" + - name: Install dependencies + run: npm ci + - name: Generate API docs site + run: npx typedoc + - name: Upload artifact + uses: actions/upload-pages-artifact@v3 + with: + path: ./docs/api + + deploy: + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + runs-on: ubuntu-latest + needs: build + steps: + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v4 diff --git a/.gitignore b/.gitignore index dda0f2a6..646c781c 100644 --- a/.gitignore +++ b/.gitignore @@ -129,7 +129,7 @@ dist .yarn/install-state.gz .pnp.* -docs/api/source/ +docs/api/ # Playwright test results -test-results/ \ No newline at end of file +test-results/ diff --git a/SECURITY.md b/SECURITY.md new file mode 100644 index 00000000..10632763 --- /dev/null +++ b/SECURITY.md @@ -0,0 +1,4 @@ +# Reporting a vulnerability + +If you discover a vulnerability in our code, or experience a bug related to security, +please report it following the instructions provided on [Inrupt’s security page](https://inrupt.com/security/). diff --git a/tsconfig.json b/tsconfig.json index cf374905..5416f714 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -15,25 +15,6 @@ // Advanced Options "stripInternal": true }, - "typedocOptions": { - "out": "docs/api/source/api", - "hideInPageTOC": true, - "entryPoints": [], - "exclude": [ - "node_modules/**", - "**/*.test.ts", - // End-to-end tests: - "e2e/**" - ], - "theme": "markdown", - "readme": "none", - "entryDocument": "index.rst", - "plugin": [ - "typedoc-plugin-markdown", - "@typhonjs-typedoc/ts-lib-docs/typedoc/ts-links/dom/2023", - "@typhonjs-typedoc/ts-lib-docs/typedoc/ts-links/esm/2023" - ] - }, "include": ["src/**/*.ts"], "exclude": [ "**/node_modules", diff --git a/typedoc.config.mjs b/typedoc.config.mjs new file mode 100644 index 00000000..3065bbc3 --- /dev/null +++ b/typedoc.config.mjs @@ -0,0 +1,37 @@ +// MIT License +// +// Copyright (c) Inrupt +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in all +// copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +// SOFTWARE. +// + +export default { + out: "docs/api/", + entryPoints: ["./src/index.ts"], + exclude: [ + "node_modules/**", + "**/*.test.ts", + // End-to-end tests: + "e2e/**", + ], + plugin: [ + "@typhonjs-typedoc/ts-lib-docs/typedoc/ts-links/dom/2023", + "@typhonjs-typedoc/ts-lib-docs/typedoc/ts-links/esm/2023", + ], +};