docs.yml 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. name: docs
  2. # Controls when the workflow will run
  3. on:
  4. # Triggers the workflow on push or pull request events but only for the master branch
  5. push:
  6. branches: [ master ]
  7. pull_request:
  8. branches: [ master ]
  9. # Allows you to run this workflow manually from the Actions tab
  10. workflow_dispatch:
  11. jobs:
  12. build-docs:
  13. runs-on: ubuntu-latest
  14. timeout-minutes: 5
  15. strategy:
  16. matrix:
  17. python-version: [3.10.x]
  18. steps:
  19. # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
  20. - uses: actions/checkout@v2
  21. - name: Setup Python
  22. uses: actions/setup-python@v2
  23. with:
  24. python-version: ${{ matrix.python }}
  25. - name: Install dependencies
  26. run: |
  27. python -m pip install --upgrade pip
  28. python -m pip install -r requirements/docs.txt
  29. python -m pip install -e .
  30. - name: Build docs and run doctests
  31. run: |
  32. sphinx-build docs "docs/_build/html" --color -W -bhtml
  33. sphinx-build -b doctest docs "docs/_build/html"