Skip to content

Commit

Permalink
ci: add mkdoc workflow
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 a63b5b4 commit 6e4bf27
Showing 1 changed file with 47 additions and 0 deletions.
47 changes: 47 additions & 0 deletions .github/mkdoc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: Deploy MkDocs

on:
push:
branches:
- main
pull_request:
branches: [ main ]

jobs:
deploy:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3.8

- name: Install dependencies
run: |
python3 -m pip install --upgrade pip
pip3 install mkdocs mkdocs-material
- name: Prepare docs
run: |
python3 update.py
mkdir docs
cp *.md docs/
cp -rf asserts/ docs/
# update mkdocs.yml
python3 update.py
- name: Build MkDocs
run: mkdocs build

- name: Deploy to GitHub Pages
uses: JamesIves/github-pages-deploy-action@v4
if: ${{ github.ref == 'refs/heads/main' }}
with:
branch: gh-pages
folder: ./site


0 comments on commit 6e4bf27

Please sign in to comment.