Merge pull request #27 from chrisr-12/metrics-tidyup #121
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: publish documentation | |
| on: | |
| push: | |
| branches: | |
| - main | |
| jobs: | |
| docs_to_gh-pages: | |
| runs-on: ubuntu-latest | |
| name: publish documentation | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| submodules: recursive | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v5 | |
| with: | |
| python-version: '3.8' | |
| - name: Install doc dependencies and build docs | |
| run: | | |
| bash scripts/install_uv.sh --no-install --no-weights --cpu | |
| uv pip install -U pip wheel setuptools | |
| uv sync --group=doc | |
| cd docs | |
| uv run --no-sync make html | |
| - name: Init repo for generated files | |
| run: | | |
| cd docs/_build/html | |
| git init | |
| touch .nojekyll | |
| git add --all | |
| git config --local user.email "[email protected]" | |
| git config --local user.name "CompressAI" | |
| git commit -m "deploy" | |
| - name: Deploy | |
| uses: peaceiris/actions-gh-pages@v3 | |
| if: github.ref == 'refs/heads/main' | |
| with: | |
| github_token: ${{ secrets.GITHUB_TOKEN }} | |
| publish_dir: docs/_build/html |