-
Notifications
You must be signed in to change notification settings - Fork 0
34 lines (30 loc) · 1.04 KB
/
release-docs.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
name: Build and release docs
on:
release:
types: [created]
jobs:
publish-docs:
runs-on: ubuntu-latest
steps:
- name: Checkout base repo
uses: actions/checkout@v3
with:
path: base-code
- name: Checkout wiki repo
uses: actions/checkout@v3
with:
repository: ${{github.repository}}.wiki
path: wiki
- name: Generate and publish markdown
env:
LATEST_MD: THREE-‐-API-${{ github.event.release.tag_name }}
run: |
scripts/gen-doc/gen-doc
mv doc/index.md wiki/$LATEST_MD.md
cd wiki
sed "s/.*documentation for the latest version.*/Click here to see the \[documentation for the latest version\]\(wiki\/$LATEST_MD.md\)/" Home.md
echo "* [$LATEST_MD](wiki/$LATEST_MD.md)" >> Home.md
git config --local user.name "CI"
git config --local user.email "[email protected]"
git add .
git diff-index --quiet HEAD || git commit -m "Update wiki" && git push