From 2cd4cd76d52405e6723387c9001dd2c27e340fbe Mon Sep 17 00:00:00 2001 From: gxz Date: Mon, 20 Nov 2023 16:18:10 +0800 Subject: [PATCH] ci: config typedoc --- .github/workflows/typedoc.yml | 47 ++++++----------------------------- 1 file changed, 7 insertions(+), 40 deletions(-) diff --git a/.github/workflows/typedoc.yml b/.github/workflows/typedoc.yml index 7ddefb1..9bb7ac2 100644 --- a/.github/workflows/typedoc.yml +++ b/.github/workflows/typedoc.yml @@ -2,30 +2,15 @@ name: TypeDoc on: - # Runs on new releases - release: - types: [published] push: - branches: [main] - -# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages -permissions: - contents: write - pages: write - id-token: write - -# Allow one concurrent deployment -concurrency: - group: 'pages' - cancel-in-progress: true + branches: + - main jobs: # Single deploy job since we're just deploying deploy: - environment: - name: github-pages - url: ${{ steps.deployment.outputs.page_url }} runs-on: ubuntu-latest + environment: github-pages steps: - name: Checkout 🛎️ uses: actions/checkout@v3 @@ -33,26 +18,8 @@ jobs: uses: ./.github/actions/setup - name: Build TypeDoc run: yarn doc - - name: Zip It Up 🤐 - run: | - zip -r agora-react-native-rtm-docs.zip docs - - name: Upload Artifact ⬆️ - uses: actions/upload-artifact@v3 - with: - name: agora-react-native-rtm-docs.zip - path: agora-react-native-rtm-docs.zip - - name: Upload Doc Archive to GitHub release ⬆️ - if: github.event.release - uses: svenstaro/upload-release-action@2.6.0 - with: - file: agora-react-native-rtm-docs.zip - asset_name: agora-react-native-rtm-docs.zip - tag: ${{ github.ref_name }} - - name: Upload artifact - uses: actions/upload-pages-artifact@v1 + - name: Deploy + uses: peaceiris/actions-gh-pages@v3 with: - # Upload docs directory - path: 'docs' - - name: Deploy to GitHub Pages - id: deployment - uses: actions/deploy-pages@v1 + github_token: ${{ secrets.GITHUB_TOKEN }} + publish_dir: ./docs