deployment again #2
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 Sphinx docs to GitHub Pages | |
| on: | |
| push: | |
| branches: | |
| - main | |
| - feature/doc | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| pages: write | |
| id-token: write | |
| # Only one deployment runs at a time; ongoing deployments are not cancelled. | |
| concurrency: | |
| group: pages | |
| cancel-in-progress: false | |
| jobs: | |
| build: | |
| name: Build documentation | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.12" | |
| cache: pip | |
| cache-dependency-path: docs/requirements.txt | |
| - name: Install Sphinx dependencies | |
| run: pip install -r docs/requirements.txt | |
| # Install the package itself in no-deps, no-build-isolation mode so that | |
| # autodoc can import mmirage. Heavy runtime dependencies (torch, sglang, | |
| # etc.) are mocked in conf.py and therefore do not need to be installed. | |
| - name: Install mmirage (no heavy deps) | |
| run: pip install --no-deps -e . | |
| - name: Build HTML docs | |
| run: sphinx-build -b html docs docs/_build/html --keep-going | |
| env: | |
| SPHINXOPTS: "-j auto" | |
| - name: Upload Pages artifact | |
| uses: actions/upload-pages-artifact@v3 | |
| with: | |
| path: docs/_build/html | |
| deploy: | |
| name: Deploy to GitHub Pages | |
| needs: build | |
| runs-on: ubuntu-latest | |
| environment: | |
| name: github-pages | |
| url: ${{ steps.deployment.outputs.page_url }} | |
| steps: | |
| - name: Deploy | |
| id: deployment | |
| uses: actions/deploy-pages@v4 |