diff --git a/.github/workflows/auto-version-release.yaml b/.github/workflows/auto-version-release.yaml index 400d3ad5c7..b0ac939ef9 100644 --- a/.github/workflows/auto-version-release.yaml +++ b/.github/workflows/auto-version-release.yaml @@ -117,6 +117,7 @@ jobs: needs: [release-doc, release-chart] uses: ./.github/workflows/call-update-githubpages.yaml with: + site_artifact_name: ${{ needs.release-doc.outputs.artifact }} chart_artifact_name: ${{ needs.release-chart.outputs.artifact }} secrets: inherit diff --git a/.github/workflows/call-release-changelog.yaml b/.github/workflows/call-release-changelog.yaml index 241c5ca781..88e062432f 100644 --- a/.github/workflows/call-release-changelog.yaml +++ b/.github/workflows/call-release-changelog.yaml @@ -141,5 +141,5 @@ jobs: delete-branch: true base: ${{ env.DEST_BRANCH }} signoff: true - token: ${{ secrets.WELAN_PAT }} + token: ${{ secrets.GITHUB_TOKEN }} labels: ${{ env.PR_LABEL }} diff --git a/.github/workflows/call-release-chart.yaml b/.github/workflows/call-release-chart.yaml index a65ac17c5f..17db0c93bb 100644 --- a/.github/workflows/call-release-chart.yaml +++ b/.github/workflows/call-release-chart.yaml @@ -139,6 +139,6 @@ jobs: delete-branch: true base: ${{ env.MERGE_BRANCH }} signoff: true - token: ${{ secrets.WELAN_PAT }} + token: ${{ secrets.GITHUB_TOKEN }} labels: ${{ env.PR_LABEL }} reviewers: ${{ env.PR_REVIWER }} diff --git a/.github/workflows/call-release-doc.yaml b/.github/workflows/call-release-doc.yaml index 0340b8a3b6..10e0d3cab8 100644 --- a/.github/workflows/call-release-doc.yaml +++ b/.github/workflows/call-release-doc.yaml @@ -9,6 +9,10 @@ on: submit: required: true type: string + outputs: + artifact: + description: "name of artifact" + value: website_package_artifact # --- call by manual workflow_dispatch: inputs: @@ -106,8 +110,25 @@ jobs: rm -rf ./site rm -rf ./mkdocs.yml git checkout -f ${{ env.MERGE_BRANCH }} + if ${{ env.SUBMIT != 'true' }}; then + cd docs + rm -rf ./charts + rm -rf ./index.yaml + tar -czvf ./site.tar.gz * + ls + echo "Automatic release, offline package ready" + fi echo "Push a doc version: ${{ env.DOCS_TAG }} from branch: ${{ env.REF }}, update it to latest: ${{ env.SET_LATEST }} " + - name: Upload Artifact + uses: actions/upload-artifact@v3.1.2 + if: ${{ env.SUBMIT != 'true' && env.SKIP_ALL_JOB != 'true' }} + with: + name: website_package_artifact + path: docs/site.tar.gz + retention-days: 0 + if-no-files-found: error + # Allow auto-merge on general - name: Create Pull Request id: create_pr @@ -121,6 +142,6 @@ jobs: delete-branch: true base: ${{ env.MERGE_BRANCH }} signoff: true - token: ${{ secrets.WELAN_PAT }} + token: ${{ secrets.GITHUB_TOKEN }} labels: ${{ env.PR_LABEL }} reviewers: ${{ env.PR_REVIWER }} diff --git a/.github/workflows/call-update-githubpages.yaml b/.github/workflows/call-update-githubpages.yaml index 1f3f87b8ed..296c8495a9 100644 --- a/.github/workflows/call-update-githubpages.yaml +++ b/.github/workflows/call-update-githubpages.yaml @@ -40,9 +40,16 @@ jobs: run: | rm -rf _oldCharts cp -rf ${{ env.DEST_DIRECTORY }}/charts _oldCharts - rm -rf ${{ env.DEST_DIRECTORY }}/charts + rm -rf ${{ env.DEST_DIRECTORY }} + mkdir ${{ env.DEST_DIRECTORY }} mkdir ${{ env.DEST_DIRECTORY }}/charts + - name: Download Website Artifact + uses: actions/download-artifact@v3 + with: + name: ${{ inputs.site_artifact_name }} + path: ${{ env.DEST_DIRECTORY }} + - name: Download Chart Artifact uses: actions/download-artifact@v3 with: @@ -51,7 +58,16 @@ jobs: - name: Untar Artifact run: | + # untar website html + cd ${{ env.DEST_DIRECTORY }} + ALL_TAR_FILE=`ls *.tar.gz` + for ITEM in $ALL_TAR_FILE ; do + echo "untar $ITEM " + tar -xzvf $ITEM + rm -f $ITEM + done # restore old charts + cd .. # do not overwrite new chart tar cp -n _oldCharts/* ${{ env.DEST_DIRECTORY }}/charts rm -rf _oldCharts @@ -73,5 +89,5 @@ jobs: delete-branch: true base: ${{ env.MERGE_BRANCH }} signoff: true - token: ${{ secrets.WELAN_PAT }} + token: ${{ secrets.GITHUB_TOKEN }} labels: ${{ env.PR_LABEL }} diff --git a/docs/mkdocs.yml b/docs/mkdocs.yml index ae27268ea1..344b245ec9 100644 --- a/docs/mkdocs.yml +++ b/docs/mkdocs.yml @@ -5,7 +5,7 @@ repo_name: spidernet-io/spiderpool repo_url: https://github.com/spidernet-io/spiderpool remote_branch: github_pages theme: - name: readthedocs + name: material custom_dir: docs/overrides # The maximum depth of the navigation tree in the sidebar navigation_depth: 2