diff --git a/.github/assets/github-pages-index.html b/.github/assets/github-pages-index.html new file mode 100644 index 0000000000..5229e043b3 --- /dev/null +++ b/.github/assets/github-pages-index.html @@ -0,0 +1,46 @@ + + + + + + + Platform.Bible API + + + +

Platform.Bible API

+ Go to papi-components + Go to papi-dts + + diff --git a/.github/workflows/publish-docs.yml b/.github/workflows/publish-docs.yml index 395401ec1d..f5b40658be 100644 --- a/.github/workflows/publish-docs.yml +++ b/.github/workflows/publish-docs.yml @@ -9,10 +9,6 @@ jobs: publish-docs: runs-on: ubuntu-latest - strategy: - matrix: - node_version: [18.x] - steps: - name: Checkout git repo uses: actions/checkout@v3 @@ -20,7 +16,7 @@ jobs: - name: Install Node and NPM uses: actions/setup-node@v3 with: - node-version: ${{ matrix.node_version }} + node-version: 18.x cache: npm - name: Install and build @@ -29,18 +25,26 @@ jobs: npm run build - name: Build documentation - run: | # renaming the folders so that pages links at /{their name} instead of at /docs - cd ~/lib/papi-components - npm run build:docs - mv docs papi-components - cd ~/lib/papi-dts - npm run build:docs - mv docs papi-dts + run: | # need to specify --out so pages links at /{their name} instead of at /docs + cd lib/papi-components + npm run build:docs -- --out papi-components + cd ../papi-dts + npm run build:docs -- --out papi-dts + cd ../../ + mkdir docs-for-pages + mv lib/papi-components/papi-components docs-for-pages + mv lib/papi-dts/papi-dts docs-for-pages + + - name: Add nojekyll # needed so that HTML pages that start with _ do not cause 404 + run: touch docs-for-pages/.nojekyll + + - name: Add landing page + run: | + cp .github/assets/github-pages-index.html docs-for-pages + mv docs-for-pages/github-pages-index.html docs-for-pages/index.html - name: Deploy to GitHub Pages uses: JamesIves/github-pages-deploy-action@4.1.4 with: branch: github-pages - folder: | - lib/papi-components/papi-components - lib/papi-dts/papi-dts + folder: docs-for-pages diff --git a/lib/papi-components/package.json b/lib/papi-components/package.json index dd622f99df..f6d1a50fb3 100644 --- a/lib/papi-components/package.json +++ b/lib/papi-components/package.json @@ -31,7 +31,7 @@ "scripts": { "start": "vite --host --open", "build:basic": "tsc && vite build && dts-bundle-generator --config ./dts-bundle-generator.config.ts", - "build:docs": "npx typedoc", + "build:docs": "typedoc", "build": "npm run build:basic && npm run lint-fix", "watch": "tsc && vite build --watch", "lint": "npm run lint:scripts && npm run lint:styles", diff --git a/lib/papi-components/typedoc.json b/lib/papi-components/typedoc.json index 8ca2afc577..b26e48dc74 100644 --- a/lib/papi-components/typedoc.json +++ b/lib/papi-components/typedoc.json @@ -1,7 +1,7 @@ { - "entryPoints": ["src"], - "entryPointStrategy": "expand", - "exclude": ["src/index.ts"], + "entryPoints": ["src/index.ts"], "out": "docs", "tsconfig": "tsconfig.json", + "sort": ["kind", "alphabetical"], + "kindSortOrder": ["Function"] } diff --git a/lib/papi-dts/package.json b/lib/papi-dts/package.json index 2d3bbc2c57..dbf32b2918 100644 --- a/lib/papi-dts/package.json +++ b/lib/papi-dts/package.json @@ -26,7 +26,7 @@ "main": "", "types": "papi.d.ts", "scripts": { - "build:docs": "npx typedoc", + "build:docs": "typedoc", "build": "tsc && prettier --write papi.d.ts && ts-node edit-papi-d-ts.ts", "build:clean": "rimraf papi.tsbuildinfo", "build:fresh": "npm run build:clean && npm run build",