Skip to content

Commit

Permalink
ci: generate link redirections when publising contrib doc
Browse files Browse the repository at this point in the history
  • Loading branch information
weihanglo committed Oct 18, 2023
1 parent 208922f commit 4f0016d
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions .github/workflows/contrib.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,23 @@ jobs:
echo `pwd`/mdbook >> $GITHUB_PATH
- name: Deploy docs
run: |
GENERATE_PY="$(pwd)/ci/generate.py"
cd src/doc/contrib
mdbook build
# Override previous ref to avoid keeping history.
git worktree add --orphan -B gh-pages gh-pages
git config user.name "Deploy from CI"
git config user.email ""
cd gh-pages
mv ../book contrib
git add contrib
# Generate HTML for link redirections.
python3 "$GENERATE_PY"
git add *.html
git add CNAME
git commit -m "Deploy $GITHUB_SHA to gh-pages"
git push origin +gh-pages

0 comments on commit 4f0016d

Please sign in to comment.