Skip to content

Commit 4f0016d

Browse files
committed
ci: generate link redirections when publising contrib doc
1 parent 208922f commit 4f0016d

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

.github/workflows/contrib.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,14 +27,23 @@ jobs:
2727
echo `pwd`/mdbook >> $GITHUB_PATH
2828
- name: Deploy docs
2929
run: |
30+
GENERATE_PY="$(pwd)/ci/generate.py"
31+
3032
cd src/doc/contrib
3133
mdbook build
34+
3235
# Override previous ref to avoid keeping history.
3336
git worktree add --orphan -B gh-pages gh-pages
3437
git config user.name "Deploy from CI"
3538
git config user.email ""
3639
cd gh-pages
3740
mv ../book contrib
3841
git add contrib
42+
43+
# Generate HTML for link redirections.
44+
python3 "$GENERATE_PY"
45+
git add *.html
46+
git add CNAME
47+
3948
git commit -m "Deploy $GITHUB_SHA to gh-pages"
4049
git push origin +gh-pages

0 commit comments

Comments
 (0)