jrnl/.github/workflows/docs.yaml
Jonathan Wren 4eb9c9fdec
Clean up copyright notices and version screen (#1553)
* update copyright symbols to unicode

* clean up version screen/copyright notice

* small change to make commands more similar

* update imports to appease isort

* fix test

* update one more file merged since PR was open
2022-08-21 14:17:35 -07:00

72 lines
1.8 KiB
YAML

# Copyright © 2012-2022 jrnl contributors
# License: https://www.gnu.org/licenses/gpl-3.0.html
name: Docs
on:
push:
branches: [ develop, release ]
paths:
- 'docs/**'
- 'docs_theme/**'
- 'mkdocs.yml'
- 'readthedocs.yml'
- '.github/workflows/docs.yaml'
pull_request:
branches: [ develop ]
paths:
- 'docs/**'
- 'docs_theme/**'
- 'mkdocs.yml'
- 'readthedocs.yml'
- '.github/workflows/docs.yaml'
jobs:
accessibility:
if: contains(toJson(github.event.commits), '[ci skip]') == false
runs-on: ubuntu-latest
strategy:
fail-fast: true
matrix:
python-version: [ 3.9 ]
os: [ ubuntu-latest ]
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Setup Node.js environment
uses: actions/setup-node@main
- name: Capture full Python version in env
run: echo "PYTHON_FULL_VERSION=$(python --version)" >> "$GITHUB_ENV"
- name: poetry cache
uses: actions/cache@v2
with:
path: .venv
key: ${{ runner.os }}-${{ hashFiles('poetry.lock') }}-${{ env.PYTHON_FULL_VERSION }}-${{ secrets.CACHE_STRING }}
- name: npm cache
uses: actions/cache@v2
with:
path: node_modules
key: ${{ runner.os }}-pa11y-v3
- name: Install dependencies
run: |
pip install poetry
poetry config --local virtualenvs.in-project true
poetry install --no-root --remove-untracked
npm install
echo "node_modules/.bin" >> "$GITHUB_PATH"
- name: Start docs server
run: poetry run poe docs-run &
- name: Accessibility testing (Pa11y)
run: poetry run poe docs-check