diff --git a/.github/workflows/deploy-kdoc-template.yml b/.github/workflows/deploy-kdoc-template.yml new file mode 100644 index 00000000000..fe091ce82f7 --- /dev/null +++ b/.github/workflows/deploy-kdoc-template.yml @@ -0,0 +1,31 @@ +name: Deploy KDoc Pages Template + +on: + workflow_call: + inputs: + destination_dir: + required: true + type: string + description: 'The destination directory for the KDoc pages in gh-pages branch' + secrets: + PUSH_TOKEN: + required: true + +concurrency: + group: deploy-to-gh-pages + cancel-in-progress: false + +jobs: + deploy: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + # https://github.com/marketplace/actions/github-pages-action + - name: Deploy to gh-pages + uses: peaceiris/actions-gh-pages@v3 + with: + personal_token: ${{ secrets.PUSH_TOKEN }} + publish_branch: gh-pages + publish_dir: ${{ inputs.destination_dir }} + destination_dir: ${{ inputs.destination_dir }} diff --git a/.github/workflows/deploy-main-v5-kdoc.yml b/.github/workflows/deploy-main-v5-kdoc.yml deleted file mode 100644 index 59d0a46d420..00000000000 --- a/.github/workflows/deploy-main-v5-kdoc.yml +++ /dev/null @@ -1,22 +0,0 @@ -name: Deploy Main V5 KDoc Pages -on: - push: - branches: 'kdoc-deploy/main-v5' - -jobs: - deploy-main-v5-kdoc-pages: - name: deploy-main-v5-kdoc-pages - runs-on: ubuntu-latest - steps: - # 检出仓库代码 - - uses: actions/checkout@v4 - - # https://github.com/marketplace/actions/github-pages-action - - name: Deploy main-v5 to doc repository - uses: peaceiris/actions-gh-pages@v3 - with: - personal_token: ${{ secrets.PUSH_TOKEN }} - publish_branch: gh-pages - # 前缀为 snapshots - publish_dir: main-v5 - destination_dir: main-v5