[ci] add ci to build & deploy docs #1
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: CI/CD Pipeline | |
| on: | |
| push: | |
| branches: [ main, develop, refactor ] | |
| pull_request: | |
| branches: [ main, develop, refactor ] | |
| env: | |
| PYTHON_VERSION: "3.13" | |
| UV_VERSION: "0.8.22" | |
| jobs: | |
| docs: | |
| name: Build Documentation | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - name: Install the latest version of uv | |
| uses: astral-sh/setup-uv@v6 | |
| with: | |
| version: ${{ env.UV_VERSION }} | |
| python-version: ${{ env.PYTHON_VERSION }} | |
| - name: Set up Python | |
| run: uv python install ${{ env.PYTHON_VERSION }} | |
| - name: Install dependencies | |
| run: uv sync --extra docs | |
| - name: Build documentation | |
| run: uv run mkdocs build | |
| - name: Deploy to GitHub Pages | |
| if: github.event_name == 'push' | |
| uses: peaceiris/actions-gh-pages@v4 | |
| with: | |
| github_token: ${{ secrets.GITHUB_TOKEN }} | |
| publish_dir: ./public |