refactor: Update GitHub workflows and documentation #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
| # Build and deploy documentation | |
| name: Build Documentation | |
| on: | |
| push: | |
| branches: ["main", "dev"] | |
| pull_request: | |
| branches: ["main", "dev"] | |
| workflow_dispatch: | |
| jobs: | |
| docs: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout source | |
| uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v4 | |
| with: | |
| python-version: "3.11" | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install -r requirements.txt | |
| pip install mkdocs-material mkdocstrings[python] | |
| - name: Build documentation | |
| run: | | |
| mkdocs build --verbose --strict | |
| - name: Check documentation links | |
| run: | | |
| mkdocs build --verbose && echo "Documentation builds successfully!" | |
| # Optional: Deploy to GitHub Pages if on main branch | |
| # - name: Deploy to GitHub Pages | |
| # if: github.ref == 'refs/heads/main' | |
| # uses: peaceiris/actions-gh-pages@v3 | |
| # with: | |
| # github_token: ${{ secrets.GITHUB_TOKEN }} | |
| # publish_dir: ./site |