From 6e273ae06e0ca48002bf57a833db8de07f5a0085 Mon Sep 17 00:00:00 2001 From: Wells Date: Mon, 19 Feb 2024 17:42:18 +0800 Subject: [PATCH] chore: update --- .github/workflows/typedoc.yml | 54 +++++++++++++++++++++++------------ 1 file changed, 36 insertions(+), 18 deletions(-) diff --git a/.github/workflows/typedoc.yml b/.github/workflows/typedoc.yml index 13c1d959..4c3dd110 100644 --- a/.github/workflows/typedoc.yml +++ b/.github/workflows/typedoc.yml @@ -1,35 +1,53 @@ -name: 'typedoc' +# Simple workflow for deploying static content to GitHub Pages +name: Deploy static content to Pages on: + # Runs on pushes targeting the default branch push: - branches: [main, chore/typedoc] + branches: ['main', 'chore/typedoc'] + # Allows you to run this workflow manually from the Actions tab + workflow_dispatch: + +# Sets the GITHUB_TOKEN permissions to allow deployment to GitHub Pages permissions: contents: read pages: write id-token: write +# Allow one concurrent deployment +concurrency: + group: 'pages' + cancel-in-progress: true + jobs: - build: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - uses: actions/setup-node@v3 - - run: yarn install - # Generate your TypeDoc documentation - - run: npx typedoc - # https://github.com/actions/upload-pages-artifact - - uses: actions/upload-pages-artifact@v2 - with: - path: ./docs # This should be your TypeDoc "out" path. + # Single deploy job since we're just deploying deploy: - runs-on: ubuntu-latest environment: name: github-pages url: ${{ steps.deployment.outputs.page_url }} - needs: build + runs-on: ubuntu-latest steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Set up Node + uses: actions/setup-node@v3 + with: + node-version: 18 + cache: 'npm' + - name: Install dependencies + run: yarn install + - name: Build + run: yarn build + - name: Build docs + run: yarn typedoc + - name: Setup Pages + uses: actions/configure-pages@v3 + - name: Upload artifact + uses: actions/upload-pages-artifact@v2 + with: + # Upload dist repository + path: './docs' - name: Deploy to GitHub Pages id: deployment - # https://github.com/actions/deploy-pages - uses: actions/deploy-pages@v4 + uses: actions/deploy-pages@v2