Skip to content

Commit

Permalink
Merge pull request spidernet-io#2270 from ty-dc/release-v0.6
Browse files Browse the repository at this point in the history
fix bug
  • Loading branch information
cyclinder authored Aug 30, 2023
2 parents 2b86d24 + f6fea05 commit 71b6c45
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 1 deletion.
1 change: 1 addition & 0 deletions .github/workflows/auto-version-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
20 changes: 20 additions & 0 deletions .github/workflows/call-release-doc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -106,8 +110,24 @@ jobs:
rm -rf ./site
rm -rf ./mkdocs.yml
git checkout -f ${{ env.MERGE_BRANCH }}
if ${{ env.SUBMIT != 'true' }}; then
rm -rf ./changelogs
tar -czvf site.tar.gz * && mv site.tar.gz ./docs/
ls
ls ./docs
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/[email protected]
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
Expand Down
21 changes: 20 additions & 1 deletion .github/workflows/call-update-githubpages.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ name: Call Update githubpages
on:
workflow_call:
inputs:
site_artifact_name:
required: true
type: string
chart_artifact_name:
required: true
type: string
Expand Down Expand Up @@ -37,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:
Expand All @@ -48,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
Expand Down

0 comments on commit 71b6c45

Please sign in to comment.