diff --git a/.github/workflows/docs-ci.yml b/.github/workflows/docs-ci.yml index e470ca47d..c4b5df4be 100644 --- a/.github/workflows/docs-ci.yml +++ b/.github/workflows/docs-ci.yml @@ -23,7 +23,7 @@ jobs: with: node-version: 18 registry-url: https://registry.npmjs.org/ - cache: 'npm' + cache: "npm" - name: Install dependencies run: npm ci @@ -41,7 +41,7 @@ jobs: entry_points: | - file: packages/api/src/index.ts docsReporter: api-extractor - docsGenerator: typedoc-markdown + docsGenerator: typedoc-html - name: Save Artifacts uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 #v3.1.3 diff --git a/.github/workflows/docs-publish.yml b/.github/workflows/docs-publish.yml index d39ccf0ec..5027d8638 100644 --- a/.github/workflows/docs-publish.yml +++ b/.github/workflows/docs-publish.yml @@ -32,62 +32,66 @@ jobs: with: node-version: 18 registry-url: https://registry.npmjs.org/ - cache: 'npm' + cache: "npm" - name: Install dependencies - run: | - npm ci - npm i jsdoc - npm i clean-jsdoc-theme - - - name: Generate documentation - run: | - echo "# Web5 JS SDK" > README-docs.md - echo "Select from the menu on the left to view API reference documentation." >> README-docs.md - npx jsdoc -c jsdoc.json - curl -o docs/favicon.ico https://developer.tbd.website/img/favicon.ico + run: npm ci - - name: Upload documentation artifacts - uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 #v3.1.3 - with: - name: jsdoc - path: ./docs - - deploy: - # Add a dependency to the build job - needs: build - - # Grant GITHUB_TOKEN the permissions required to make a Pages deployment - permissions: - contents: read # to read from project repo - pages: write # to deploy to Pages - id-token: write # to verify the deployment originates from an appropriate source - - # Deploy to the github-pages environment - environment: - name: github-pages - url: ${{ steps.deployment.outputs.page_url }} - - runs-on: ubuntu-latest - - steps: - - name: Checkout - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 #v4.1.1 + - name: Build all workspace packages + run: npm run build - - name: Setup Pages - uses: actions/configure-pages@v3 - - - name: Download JSDoc artifacts - uses: actions/download-artifact@v3 + - name: TBDocs Reporter + id: tbdocs-reporter-protocol + uses: TBD54566975/tbdocs@leordev/gh-pages-html with: - name: jsdoc - path: ./docs + token: ${{ secrets.GITHUB_TOKEN }} + fail_on_error: true + entry_points: | + - file: packages/api/src/index.ts + docsReporter: api-extractor + docsGenerator: typedoc-html - - name: Upload artifact - uses: actions/upload-pages-artifact@v1 + - name: Upload documentation artifacts + uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 #v3.1.3 with: - path: "./docs" - - - name: Deploy to GitHub Pages - id: deployment - uses: actions/deploy-pages@v2 + name: web5-api-docs + path: ./packages/api/.tbdocs/docs + + # deploy: + # # Add a dependency to the build job + # needs: build + + # # Grant GITHUB_TOKEN the permissions required to make a Pages deployment + # permissions: + # contents: read # to read from project repo + # pages: write # to deploy to Pages + # id-token: write # to verify the deployment originates from an appropriate source + + # # Deploy to the github-pages environment + # environment: + # name: github-pages + # url: ${{ steps.deployment.outputs.page_url }} + + # runs-on: ubuntu-latest + + # steps: + # - name: Checkout + # uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 #v4.1.1 + + # - name: Setup Pages + # uses: actions/configure-pages@v3 + + # - name: Download JSDoc artifacts + # uses: actions/download-artifact@v3 + # with: + # name: jsdoc + # path: ./docs + + # - name: Upload artifact + # uses: actions/upload-pages-artifact@v1 + # with: + # path: "./docs" + + # - name: Deploy to GitHub Pages + # id: deployment + # uses: actions/deploy-pages@v2