Skip to content

Commit

Permalink
Update docs.yaml to use Pixi
Browse files Browse the repository at this point in the history
  • Loading branch information
hoxbro committed Oct 14, 2024
1 parent 6dfb850 commit 53780af
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 18 deletions.
57 changes: 39 additions & 18 deletions .github/workflows/docs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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: |
Expand Down
1 change: 1 addition & 0 deletions pixi.toml
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,7 @@ nbval = "*"
channels = ["pyviz"]

[feature.doc.dependencies]
graphviz = "*"
nbsite = ">=0.8.4,<0.9.0"
sphinx-remove-toctrees = "*"

Expand Down

0 comments on commit 53780af

Please sign in to comment.