diff --git a/.github/workflows/docs.yaml b/.github/workflows/docs.yaml index 2a79c9cd..418f8f0e 100644 --- a/.github/workflows/docs.yaml +++ b/.github/workflows/docs.yaml @@ -20,32 +20,53 @@ on: schedule: - cron: "0 13 * * SUN" +defaults: + run: + shell: bash -e {0} + +env: + DISPLAY: ":99.0" + jobs: - build_docs: - name: Documentation + 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: "ubuntu-latest" timeout-minutes: 120 - defaults: - run: - shell: bash -l {0} steps: - - uses: actions/checkout@v4 - - name: Fetch unshallow - run: git fetch --prune --tags --unshallow -f - - uses: actions/setup-python@v5 + - uses: holoviz-dev/holoviz_tasks/pixi_install@v0 + with: + environments: docs + - name: Build documentation + run: pixi run -e docs docs-build + - uses: actions/upload-artifact@v4 + if: always() with: - python-version: "3.9" + name: docs + if-no-files-found: error + path: builtdocs - name: Set output id: vars run: echo "tag=${GITHUB_REF#refs/*/}" >> $GITHUB_OUTPUT - - name: graphviz - run: sudo apt install graphviz graphviz-dev - - name: env setup - run: | - python -m pip install --upgrade pip - python -m pip install hatch - - name: build docs - run: hatch -v run docs:build + + docs_publish: + name: Publish Documentation + runs-on: "ubuntu-latest" + needs: [docs_build] + steps: + - uses: actions/download-artifact@v4 + 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 if: | diff --git a/pixi.toml b/pixi.toml index 23e7275e..b60d38e4 100644 --- a/pixi.toml +++ b/pixi.toml @@ -125,6 +125,7 @@ nbval = "*" channels = ["pyviz"] [feature.doc.dependencies] +graphviz = "*" nbsite = ">=0.8.4,<0.9.0" sphinx-remove-toctrees = "*"