mirror of
https://github.com/kubevela/kubevela.git
synced 2026-08-18 03:56:36 +00:00
add release docs when have tag (#1444)
This commit is contained in:
@@ -82,4 +82,14 @@ jobs:
|
||||
upload_url: ${{ steps.get_release.outputs.upload_url }}
|
||||
asset_path: ./_bin/sha256sums.txt
|
||||
asset_name: sha256sums.txt
|
||||
asset_content_type: text/plain
|
||||
asset_content_type: text/plain
|
||||
- uses: actions/setup-node@v1
|
||||
with:
|
||||
node-version: '12.x'
|
||||
- name: Sync release to kubevela.io Repo
|
||||
env:
|
||||
SSH_DEPLOY_KEY: ${{ secrets.GH_PAGES_DEPLOY }}
|
||||
VERSION: ${{ steps.get_version.outputs.VERSION }}
|
||||
COMMIT_ID: ${{ github.sha }}
|
||||
run: |
|
||||
bash ./hack/website/release.sh
|
||||
+34
-1
@@ -49,7 +49,38 @@ cp -R docs/en/* git-page/docs/
|
||||
echo "git push"
|
||||
cd git-page
|
||||
|
||||
# Check for release only
|
||||
# Check for release created only
|
||||
SUB='v'
|
||||
if [[ "$VERSION" == "$SUB"* ]]
|
||||
then
|
||||
# vx.y.z -> vx.y
|
||||
sub="."
|
||||
major="$(cut -d"$sub" -f1 <<<"$VERSION")"
|
||||
minor="$(cut -d"$sub" -f2 <<<"$VERSION")"
|
||||
|
||||
version=${major}.${minor}
|
||||
echo "updating website for version $version"
|
||||
|
||||
if grep -q $version versions.json; then
|
||||
rm -r versioned_docs/version-${version}/
|
||||
rm versioned_sidebars/version-${version}-sidebars.json
|
||||
sed -i.bak "/${version}/d" versions.json
|
||||
rm versions.json.bak
|
||||
fi
|
||||
|
||||
yarn add nodejieba
|
||||
if [ -e yarn.lock ]; then
|
||||
yarn install --frozen-lockfile
|
||||
elif [ -e package-lock.json ]; then
|
||||
npm ci
|
||||
else
|
||||
npm i
|
||||
fi
|
||||
|
||||
yarn run docusaurus docs:version $version
|
||||
fi
|
||||
|
||||
# Check for release branch update only
|
||||
SUB='release-'
|
||||
if [[ "$VERSION" == *"$SUB"* ]]
|
||||
then
|
||||
@@ -77,6 +108,8 @@ then
|
||||
yarn run docusaurus docs:version $version
|
||||
fi
|
||||
|
||||
|
||||
|
||||
if git diff --quiet
|
||||
then
|
||||
echo "nothing need to push, finished!"
|
||||
|
||||
Reference in New Issue
Block a user