Skip to content

Commit

Permalink
Update headless-gui action in build (fix screenshots) (#294)
Browse files Browse the repository at this point in the history
# References and relevant issues
~~Hopefully f i x e s~~ Pretty sure now this fixes both #283 and #285 

# Description
This configures the
[headless-gui](https://github.com/aganders3/headless-gui) action to not
run the tiling window manager it uses by default. My thinking is the
tiling behavior in the window manager is causing issues with certain
screenshots. See
#283 (comment) for
more details.

This also updates the action to a new version with a more common default
screen size. This change in bit-depth fixes the messed up magicgui
screenshot.

Edit: I'm still not _totally_ clear why the stable docs would look okay
but I think this is worth trying.

---------

Co-authored-by: Peter Sobolewski <[email protected]>
  • Loading branch information
aganders3 and psobolewskiPhD authored Dec 15, 2023
1 parent 0c7029e commit 85636bc
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
8 changes: 6 additions & 2 deletions .github/workflows/build_docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,14 +53,18 @@ jobs:
python -c 'import napari.layers; print(napari.layers.__doc__)'
- name: Build Docs
uses: aganders3/headless-gui@v1
uses: aganders3/headless-gui@v2
env:
GOOGLE_CALENDAR_ID: ${{ secrets.GOOGLE_CALENDAR_ID }}
GOOGLE_CALENDAR_API_KEY: ${{ secrets.GOOGLE_CALENDAR_API_KEY }}
PIP_CONSTRAINT: ${{ github.workspace }}/napari/resources/constraints/constraints_py3.10_docs.txt
with:
run: make -C docs docs

# skipping setup stops the action from running the default (tiling) window manager
# the window manager is not necessary for docs builds at this time and it was causing
# problems with screenshots (https://github.com/napari/docs/issues/285)
linux-setup: "echo 'skip setup'"
linux-teardown: "echo 'skip teardown'"

- name: Upload artifact
uses: actions/upload-artifact@v3
Expand Down
7 changes: 6 additions & 1 deletion .github/workflows/deploy_docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ jobs:
python -c 'import napari.layers; print(napari.layers.__doc__)'
- name: Build Docs
uses: aganders3/headless-gui@v1
uses: aganders3/headless-gui@v2
env:
GOOGLE_CALENDAR_ID: ${{ secrets.GOOGLE_CALENDAR_ID }}
GOOGLE_CALENDAR_API_KEY: ${{ secrets.GOOGLE_CALENDAR_API_KEY }}
Expand All @@ -63,6 +63,11 @@ jobs:
# the napari-docs repo is cloned into a docs/ folder, hence the
# invocation below. Locally, you should simply run make docs
run: make -C docs docs GALLERY_PATH=../examples/
# skipping setup stops the action from running the default (tiling) window manager
# the window manager is not necessary for docs builds at this time and it was causing
# problems with screenshots (https://github.com/napari/docs/issues/285)
linux-setup: "echo 'skip setup'"
linux-teardown: "echo 'skip teardown'"

- name: Deploy Docs
uses: peaceiris/actions-gh-pages@v3
Expand Down

0 comments on commit 85636bc

Please sign in to comment.