From 010b5d846a6e14f88ec01d4f9f1c42b5ae8f88eb Mon Sep 17 00:00:00 2001 From: carm Date: Mon, 19 Dec 2022 19:09:07 +0800 Subject: [PATCH] =?UTF-8?q?ci(deploy):=20=E4=BF=AE=E5=A4=8D=E9=83=A8?= =?UTF-8?q?=E7=BD=B2=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/javadoc.yml | 74 ----------------------------------- 1 file changed, 74 deletions(-) delete mode 100644 .github/workflows/javadoc.yml diff --git a/.github/workflows/javadoc.yml b/.github/workflows/javadoc.yml deleted file mode 100644 index 52507cf..0000000 --- a/.github/workflows/javadoc.yml +++ /dev/null @@ -1,74 +0,0 @@ -name: "Publish Javadoc" - -on: - # 支持手动触发构建 - workflow_dispatch: - release: - # 创建release的时候触发 - types: [ published ] - - -jobs: - - javadoc-deploy: - name: "Deploy Javadoc (Github Pages)" - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - name: "Set up JDK" - uses: actions/setup-java@v2 - with: - java-version: '8' - distribution: 'adopt' - cache: maven - - - name: "Generate Javadoc" - run: mvn -B javadoc:javadoc -pl api --file pom.xml -DskipTests - - - name: "Copy Javadoc" - run: | - rm -rf docs - mkdir -vp docs - cp -vrf api/target/site/apidocs/* docs/ - cp -vrf .doc/javadoc/JAVADOC-README.md docs/README.md - - - name: "Generate Sitemap" - id: sitemap - uses: cicirello/generate-sitemap@v1 - with: - base-url-path: https://${{ github.repository_owner }}.github.io/${{ github.event.repository.name }} - path-to-root: docs - - - name: Output stats - run: | - echo "sitemap-path = ${{ steps.sitemap.outputs.sitemap-path }}" - echo "url-count = ${{ steps.sitemap.outputs.url-count }}" - echo "excluded-count = ${{ steps.sitemap.outputs.excluded-count }}" - ls -l docs - - - name: Configure Git - env: - DEPLOY_PRI: ${{secrets.DEPLOY_PRI}} - run: | - sudo timedatectl set-timezone "Asia/Shanghai" - mkdir -p ~/.ssh/ - echo "$DEPLOY_PRI" > ~/.ssh/id_rsa - chmod 600 ~/.ssh/id_rsa - ssh-keyscan github.com >> ~/.ssh/known_hosts - git config --global user.name '${{ github.repository_owner }}' - git config --global user.email '${{ github.repository_owner }}@users.noreply.github.com' - - - name: Commit documentation changes - run: | - echo "Committing changes to git@github.com:${{ github.repository_owner }}/${{ github.event.repository.name }}.git ..." - cd docs - git init - git remote add origin git@github.com:${{ github.repository_owner }}/${{ github.event.repository.name }}.git - git checkout -b gh-pages - git add -A - git commit -m "API Document generated." - - - name: Javadoc Website Push - run: | - cd docs - git push origin HEAD:gh-pages --force \ No newline at end of file