From c8c873ba77c97b4d74cd20844dc581f58562bbf8 Mon Sep 17 00:00:00 2001 From: Tom Anderson Date: Mon, 15 Apr 2024 14:26:15 +1000 Subject: [PATCH] update release action to generate docs includes building and uploading docs to github pages. --- .github/workflows/release.yml | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 96db718..ad62c6e 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -31,3 +31,36 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} NPM_TOKEN: ${{ secrets.NPM_TOKEN }} + + generate-docs: + name: Generate and deploy documentation + + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + + runs-on: ubuntu-latest + + steps: + - name: Checkout Repo + uses: actions/checkout@v4 + + - name: Setup Node.js 20.x + uses: actions/setup-node@v4 + with: + node-version: 20.x + + - name: Build docs + run: npm run doc + + - name: Setup pages + uses: actions/configure-pages@v4 + + - name: Upload docs + uses: actions/upload-pages-artifact@v2 + with: + path: ./docs + + - name: Deploy to Github Pages + id: deployment + uses: actions/deploy-pages@v2