Skip to content

Commit

Permalink
ci: enable mkdocs github action
Browse files Browse the repository at this point in the history
Signed-off-by: Huaqi Fang <[email protected]>
  • Loading branch information
fanghuaqi committed Dec 1, 2023
1 parent 6e4bf27 commit f44e891
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 7 deletions.
17 changes: 17 additions & 0 deletions .github/prepare_doc.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#!/bin/env bash

if [ ! -f mkdocs.yml ] ; then
echo "Not in mkdocs.yml located document folder!"
exit 1
fi

# update mkdocs.yml and README.md
python3 update.py
rm -rf docs site
mkdir -p docs
cp -rf *.md docs/
cp -rf asserts/ docs/

echo "Document for mkdocs is prepared!"
echo "Run the following command to build and serve these doc!"
echo "mkdocs serve -a 0.0.0.0:8009"
7 changes: 1 addition & 6 deletions .github/mkdoc.yml → .github/workflows/mkdoc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,7 @@ jobs:
- name: Prepare docs
run: |
python3 update.py
mkdir docs
cp *.md docs/
cp -rf asserts/ docs/
# update mkdocs.yml
python3 update.py
bash .github/prepare_doc.sh
- name: Build MkDocs
run: mkdocs build
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Please create new doc based on [Doc Template](0-template.md)

## Documents

> Generated by `python3 update.py` @ 2023-12-01 16:41:30
> Generated by `python3 update.py` @ 2023-12-01 17:06:53
| Document | Description |
|:---|:---|
Expand Down

0 comments on commit f44e891

Please sign in to comment.