add separate publish workflow that runs on releases #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
| name: Test sphinx docs build | ||
| on: | ||
| push: | ||
| branches: | ||
| - main | ||
| pull_request: | ||
| branches: | ||
| - '**' | ||
| workflow_dispatch: {} | ||
| jobs: | ||
| test: | ||
| name: Test sphinx docs | ||
| runs-on: ubuntu-latest | ||
| env: | ||
| UV_FROZEN: 1 | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| with: | ||
| submodules: true | ||
| - uses: extractions/setup-just@v3 | ||
| with: | ||
| just-version: '1.40.0' | ||
| - name: Install uv | ||
| uses: astral-sh/setup-uv@v7 | ||
| with: | ||
| enable-cache: true | ||
| version: "0.11.3" | ||
| - name: Run the docs build | ||
| run: | | ||
| cd zixy-py/docs && just build-strict | ||
| publish: | ||
| name: Publish docs. | ||
| environment: | ||
| name: github-pages | ||
| url: ${{ steps.deployment.outputs.page_url }} | ||
| runs-on: ubuntu-latest | ||
| if: ${{github.event_name == 'push' }} | ||
| steps: | ||
| - name: Setup Pages | ||
| uses: actions/configure-pages@v6 | ||
| - name: Deploy to GitHub Pages. | ||
| id: deployment | ||
| uses: actions/deploy-pages@v5 | ||