docs #1093
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
| name: docs | |
| on: | |
| pull_request: | |
| branches: | |
| - "*" | |
| push: | |
| tags: | |
| - "v[0-9]+.[0-9]+.[0-9]+" | |
| - "v[0-9]+.[0-9]+.[0-9]+a[0-9]+" | |
| - "v[0-9]+.[0-9]+.[0-9]+b[0-9]+" | |
| - "v[0-9]+.[0-9]+.[0-9]+rc[0-9]+" | |
| workflow_dispatch: | |
| inputs: | |
| target: | |
| description: "Site to build and deploy" | |
| type: choice | |
| options: | |
| - dev | |
| - main | |
| - dryrun | |
| required: true | |
| default: dryrun | |
| schedule: | |
| - cron: "0 19 * * SUN" | |
| defaults: | |
| run: | |
| shell: bash -e {0} | |
| # Required for peaceiris/actions-gh-pages to give write permissions to the GITHUB_TOKEN | |
| permissions: | |
| contents: write | |
| env: | |
| DISPLAY: ":99.0" | |
| jobs: | |
| pixi_lock: | |
| name: Pixi lock | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: holoviz-dev/holoviz_tasks/pixi_lock@v0 | |
| docs_build: | |
| name: Build Documentation | |
| needs: [pixi_lock] | |
| runs-on: "macos-latest" | |
| timeout-minutes: 180 | |
| outputs: | |
| tag: ${{ steps.vars.outputs.tag }} | |
| steps: | |
| - uses: holoviz-dev/holoviz_tasks/pixi_install@v0 | |
| with: | |
| environments: docs | |
| - name: Fetch full Git history | |
| run: git fetch --unshallow | |
| - name: Build documentation | |
| run: pixi run -e docs docs-build | |
| - uses: actions/upload-artifact@v6 | |
| if: always() | |
| with: | |
| name: docs | |
| if-no-files-found: error | |
| path: builtdocs | |
| - name: Set output | |
| id: vars | |
| run: echo "tag=${GITHUB_REF#refs/*/}" >> $GITHUB_OUTPUT | |
| docs_publish: | |
| name: Publish Documentation | |
| runs-on: "ubuntu-latest" | |
| needs: [docs_build] | |
| steps: | |
| - uses: actions/download-artifact@v7 | |
| with: | |
| name: docs | |
| path: builtdocs/ | |
| - name: Set output | |
| id: vars | |
| run: echo "tag=${{ needs.docs_build.outputs.tag }}" >> $GITHUB_OUTPUT | |
| - name: Deploy dev | |
| uses: peaceiris/actions-gh-pages@v4 | |
| # Dev site built on PRs | |
| if: | | |
| (github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository) || | |
| (github.event_name == 'workflow_dispatch' && github.event.inputs.target == 'dev') || | |
| (github.event_name == 'push' && (contains(steps.vars.outputs.tag, 'a') || contains(steps.vars.outputs.tag, 'b') || contains(steps.vars.outputs.tag, 'rc'))) | |
| with: | |
| personal_token: ${{ secrets.HOLOVIZ_ACCESS_TOKEN }} | |
| external_repository: holoviz-dev/panel-material-ui | |
| publish_dir: ./builtdocs | |
| force_orphan: true | |
| - name: Deploy main | |
| if: | | |
| (github.event_name != 'pull_request') && | |
| ((github.event_name == 'workflow_dispatch' && github.event.inputs.target == 'main') || | |
| (github.event_name == 'push' && !(contains(steps.vars.outputs.tag, 'a') || contains(steps.vars.outputs.tag, 'b') || contains(steps.vars.outputs.tag, 'rc')))) | |
| uses: peaceiris/actions-gh-pages@v4 | |
| with: | |
| github_token: ${{ secrets.GITHUB_TOKEN }} | |
| publish_dir: ./builtdocs | |
| force_orphan: true | |
| cname: panel-material-ui.holoviz.org |