mirror of
https://github.com/jrnl-org/jrnl.git
synced 2025-06-28 05:26:13 +02:00
Fix docs pipeline, make docs tests easier to run locally and on different OSes (#1554)
* update docs pipeline to use poe task runner * move npm dependency into package.json file instead of hardcoding into pipeline * replace nix-specific call with python version (for windows compat) * update commands to use python for win compat * update lock file * change deps to take out xq and use xmltodict instead * move script tasks from pyproject into new tasks.py * run linting on new tasks.py file * fix typo * clean up pyproject to make valid toml * update docs with correct task runner command * use npx in case node_modules/.bin isn't in the path * Run pa11y-ci in cross-platform manner (works on Windows) * Add node_modules to .gitignore * clean up poe alias Co-authored-by: Micah Jerome Ellison <micah.jerome.ellison@gmail.com>
This commit is contained in:
parent
33607acbb6
commit
671f403602
8 changed files with 2397 additions and 300 deletions
21
.github/workflows/docs.yaml
vendored
21
.github/workflows/docs.yaml
vendored
|
@ -62,26 +62,11 @@ jobs:
|
|||
pip install poetry
|
||||
poetry config --local virtualenvs.in-project true
|
||||
poetry install --no-root --remove-untracked
|
||||
npm install pa11y-ci
|
||||
npm install
|
||||
echo "node_modules/.bin" >> $GITHUB_PATH
|
||||
|
||||
- name: Start docs server
|
||||
run: poetry run poe docs &
|
||||
|
||||
- name: Generate sitemap
|
||||
env:
|
||||
site_url: http://127.0.0.1:8000
|
||||
run: |
|
||||
filename='sitemap.xml'
|
||||
select="{urls: [\"${site_url}/\", \"${site_url}/search.html?q=jrnl\", .urlset.url[].loc]}"
|
||||
|
||||
curl -s "${site_url}/${filename}" > $filename
|
||||
|
||||
echo "::group::${filename}"
|
||||
cat $filename
|
||||
echo '::endgroup::'
|
||||
|
||||
poetry run xq "$select" $filename > list.json
|
||||
run: poetry run poe docs-run &
|
||||
|
||||
- name: Accessibility testing (Pa11y)
|
||||
run: pa11y-ci -c list.json
|
||||
run: poetry run poe docs-check
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue