fix: documentation and tools (#8) #5
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: Deploy Docs | |
| on: | |
| push: | |
| branches: [main, master] | |
| paths: | |
| - "docs/**" | |
| - "CONTRIBUTING.md" | |
| - "DEVELOPMENT.md" | |
| - "LICENSE" | |
| - ".github/workflows/deploy-docs.yml" | |
| permissions: | |
| contents: write | |
| jobs: | |
| deploy: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v5 | |
| - name: Setup Pages | |
| uses: actions/configure-pages@v5 | |
| - name: Install uv | |
| run: | | |
| curl -LsSf https://astral.sh/uv/install.sh | sh | |
| echo "$HOME/.cargo/bin" >> $GITHUB_PATH | |
| - name: Sync dependencies | |
| run: uv sync | |
| - name: Run tests with coverage | |
| run: | | |
| uv run -m coverage run -m pytest | |
| uv run -m coverage combine | |
| uv run -m coverage xml | |
| - name: Create badges directory | |
| run: mkdir -p docs/badges | |
| - name: Install coverage-badge | |
| run: uv pip install coverage-badge | |
| - name: Generate coverage badge | |
| run: uv run coverage-badge -o docs/badges/coverage-badge.svg | |
| - name: Copy root files to docs | |
| run: | | |
| cp CONTRIBUTING.md docs/contributing-guide.md | |
| cp DEVELOPMENT.md docs/development.md && sed -i 's/CONTRIBUTING\.md/contributing-guide.html/g' docs/development.md | |
| cp LICENSE docs/LICENSE.txt | |
| - name: Build with Jekyll | |
| uses: actions/jekyll-build-pages@v1 | |
| with: | |
| source: ./docs | |
| destination: ./_site | |
| - name: Deploy to GitHub Pages | |
| uses: peaceiris/actions-gh-pages@v4 | |
| with: | |
| github_token: ${{ secrets.GITHUB_TOKEN }} | |
| publish_dir: ./_site |