feat(pkg-py): First pass at new website #178
Workflow file for this run
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
| # Workflow derived from https://github.com/posit-dev/shinychat/blob/main/.github/workflows/quartodoc.yaml | |
| on: | |
| push: | |
| branches: | |
| - main | |
| paths: | |
| - "docs/**/*" | |
| - "pkg-py/**/*" | |
| - .github/workflows/docs-py-quartodoc.yml | |
| pull_request: | |
| paths: | |
| - "docs/**/*" | |
| - "pkg-py/**/*" | |
| - .github/workflows/docs-py-quartodoc.yml | |
| release: | |
| types: [published] | |
| workflow_dispatch: | |
| name: docs-py-quartodoc.yml | |
| permissions: | |
| contents: write | |
| env: | |
| UV_VERSION: "0.7.x" | |
| PYTHON_VERSION: 3.13 | |
| QUARTO_VERSION: 1.7.31 | |
| jobs: | |
| py-docs-quartodoc: | |
| runs-on: ubuntu-latest | |
| # Only run on release events for tags start with "py/v*" | |
| if: github.event_name != 'release' || startsWith(github.ref, 'refs/tags/py/v') | |
| steps: | |
| - name: Check out repository | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: π΅ Set up Quarto | |
| uses: quarto-dev/quarto-actions/setup@v2 | |
| with: | |
| version: ${{ env.QUARTO_VERSION }} | |
| - name: π Install uv | |
| uses: astral-sh/[email protected] | |
| with: | |
| version: ${{ env.UV_VERSION }} | |
| - name: π Set up Python ${{ env.PYTHON_VERSION }} | |
| run: uv python install ${{ env.PYTHON_VERSION }} | |
| - name: π¦ Install package and dependencies | |
| run: uv sync --python ${{ env.PYTHON_VERSION }} --all-extras --all-groups | |
| - name: π Activate venv | |
| run: | | |
| source .venv/bin/activate | |
| echo "$VIRTUAL_ENV/bin" >> $GITHUB_PATH | |
| echo "VIRTUAL_ENV=$VIRTUAL_ENV" >> $GITHUB_ENV | |
| - name: π Update Python docs | |
| run: | | |
| make py-docs-api | |
| quarto render pkg-py/docs | |
| - name: π’ Deploy to GitHub pages | |
| if: github.event_name != 'pull_request' | |
| uses: JamesIves/[email protected] | |
| with: | |
| clean: false | |
| folder: docs | |
| branch: gh-pages |