Skip to content

Commit cde7d00

Browse files
authored
[RELEASE][DOC][CI] Updated docs workflow (#1830)
[DOC][CI] Updated docs wf - to keep contents for previously released docs Signed-off-by: Yunchu Lee <[email protected]>
1 parent 5359454 commit cde7d00

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

.github/workflows/docs.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,15 +47,15 @@ jobs:
4747
git checkout gh-pages
4848
mkdir -p /tmp/docs_build
4949
cp -r docs/build/html/* /tmp/docs_build/
50-
rm -rf ./*
50+
rm -rf ${{ env.RELEASE_VERSION }}/*
5151
echo '<html><head><meta http-equiv="refresh" content="0; url=stable/" /></head></html>' > index.html
5252
mkdir -p ${{ env.RELEASE_VERSION }}
5353
cp -r /tmp/docs_build/* ./${{ env.RELEASE_VERSION }}
5454
ln -sf ${{ env.RELEASE_VERSION }} latest
5555
rm -rf /tmp/docs_build
5656
git config --local user.email "[email protected]"
5757
git config --local user.name "GitHub Action"
58-
git add .
58+
git add ${{ env.RELEASE_VERSION }}
5959
git commit -m "Update documentation" -a || true
6060
- name: Push changes
6161
uses: ad-m/github-push-action@master

.github/workflows/docs_stable.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,15 +47,15 @@ jobs:
4747
git checkout gh-pages
4848
mkdir -p /tmp/docs_build
4949
cp -r docs/build/html/* /tmp/docs_build/
50-
rm -rf ./*
50+
rm -rf ${{ env.RELEASE_VERSION }}/*
5151
echo '<html><head><meta http-equiv="refresh" content="0; url=stable/" /></head></html>' > index.html
5252
mkdir -p ${{ env.RELEASE_VERSION }}
5353
cp -r /tmp/docs_build/* ./${{ env.RELEASE_VERSION }}
5454
ln -sf ${{ env.RELEASE_VERSION }} stable
5555
rm -rf /tmp/docs_build
5656
git config --local user.email "[email protected]"
5757
git config --local user.name "GitHub Action"
58-
git add .
58+
git add ${{ env.RELEASE_VERSION }}
5959
git commit -m "Update documentation" -a || true
6060
- name: Push changes
6161
uses: ad-m/github-push-action@master

.github/workflows/docs_test.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,14 +48,14 @@ jobs:
4848
git checkout gh-pages
4949
mkdir -p /tmp/docs_build
5050
cp -r docs/build/html/* /tmp/docs_build/
51-
rm -rf ./*
51+
rm -rf ${{ env.RELEASE_VERSION }}/*
5252
echo '<html><head><meta http-equiv="refresh" content="0; url=stable/" /></head></html>' > index.html
5353
mkdir -p ${{ env.RELEASE_VERSION }}
5454
cp -r /tmp/docs_build/* ./${{ env.RELEASE_VERSION }}
5555
rm -rf /tmp/docs_build
5656
git config --local user.email "[email protected]"
5757
git config --local user.name "GitHub Action"
58-
git add .
58+
git add ${{ env.RELEASE_VERSION }}
5959
git commit -m "Update documentation" -a || true
6060
- name: Push changes
6161
uses: ad-m/github-push-action@master

0 commit comments

Comments
 (0)