Skip to content

Commit

Permalink
pa11y-ci now works properly when called from Make
Browse files Browse the repository at this point in the history
  • Loading branch information
tarek-y-ismail committed Oct 4, 2024
1 parent 1cd44ba commit cc1230f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions doc/sphinx/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ BUILDDIR = _build
VENVDIR = $(SPHINXDIR)/venv
PA11Y = $(SPHINXDIR)/node_modules/pa11y-ci/bin/pa11y-ci.js --config $(SPHINXDIR)/pa11y.json
VENV = $(VENVDIR)/bin/activate
HTML := $(shell find $(BUILDDIR) -name *.html -print0)

.PHONY: help full-help woke-install pa11y-install install run html epub serve \
clean clean-doc spelling linkcheck woke pa11y Makefile
Expand Down Expand Up @@ -102,9 +103,9 @@ run: install
# Doesn't depend on $(BUILDDIR) to rebuild properly at every run.
html: install configure
# Don't rebuild html if already built
if [ -f "../build_doc/doc/sphinx/_build/index.html" ]; then exit 0; fi; \
. $(VENV); \
cd ../build_doc/doc/sphinx; \
. $(VENV); \
if [ -f "_build/index.html" ]; then exit 0; fi; \
$(SPHINXBUILD) -b dirhtml "$(SOURCEDIR)" "$(BUILDDIR)" -w $(SPHINXDIR)/warnings.txt $(SPHINXOPTS)

epub: install
Expand Down Expand Up @@ -134,8 +135,7 @@ woke: woke-install
-c https://github.com/canonical/Inclusive-naming/raw/main/config.yml

pa11y: pa11y-install html
cd ../build_doc/doc/sphinx; \
$(PA11Y) $(shell find $(BUILDDIR) -name *.html);
$(PA11Y) $(shell find ../build_doc/doc/sphinx/_build -name *.html);

# Catch-all target: route all unknown targets to Sphinx using the new
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
Expand Down

0 comments on commit cc1230f

Please sign in to comment.