Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix docs pipeline, make docs tests easier to run locally and on different OSes #1554

Merged
merged 15 commits into from Aug 21, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
21 changes: 3 additions & 18 deletions .github/workflows/docs.yaml
Expand Up @@ -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
1 change: 1 addition & 0 deletions .gitignore
Expand Up @@ -16,6 +16,7 @@ parts/
sdist/
.tox/
var/
node_modules/

# Versioning
.python-version
Expand Down
2 changes: 1 addition & 1 deletion docs/contributing.md
Expand Up @@ -27,7 +27,7 @@ Please report bugs by [opening a new issue](https://github.com/jrnl-org/jrnl/iss

If you find a typo or a mistake in the docs, please fix it right away and send a pull request. If you're unsure what to change but still see a problem, you can [open a new issue](https://github.com/jrnl-org/jrnl/issues/new/choose) with the "Documentation change" type.

To edit the documentation, edit the `docs/*.md` files on the **develop** branch. You can see the result by running `poe docs` inside the project's root directory, then navigating your browser to [localhost:8000](http://localhost:8000).
To edit the documentation, edit the `docs/*.md` files on the **develop** branch. You can see the result by running `poe docs-run` inside the project's root directory, then navigating your browser to [localhost:8000](http://localhost:8000).

The `gh-pages` branch is automatically maintained and generated after your changes are merged. You should never have to edit that branch.

Expand Down