diff --git a/.github/workflows/docs-build.yml b/.github/workflows/docs-build.yml new file mode 100644 index 0000000..caadc1a --- /dev/null +++ b/.github/workflows/docs-build.yml @@ -0,0 +1,44 @@ +name: "Pull Request Docs Check" + +on: + pull_request: + paths: + - ".github/workflows/docs-build.yml" + - "docs/**" + push: + paths: + - ".github/workflows/docs-build.yml" + - "docs/**" + branches: + - main + +env: + DEFAULT_PYTHON: "3.10" + +jobs: + docs: + runs-on: ubuntu-22.04 + steps: + - name: Checkout + uses: actions/checkout@v3 + with: + fetch-depth: 0 + - name: Set up Python + uses: actions/setup-python@v4 + with: + python-version: ${{ env.DEFAULT_PYTHON }} + + - name: Install dependencies and build docs + run: | + set -eux + # Setup version + version=$(git describe --tags --abbrev=0) || exit 1 + echo "__version__ = '$version'" | tee trakt/__version__.py + python -c "from trakt import __version__; print(__version__)" + + # Install deps and build docs + pip install -r requirements.txt + sudo apt install sphinx + make docs + +# vim:ts=2:sw=2:et diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index fd8030b..c7fba60 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -2,7 +2,13 @@ name: Test on: pull_request: + paths-ignore: + - ".github/workflows/docs-build.yml" + - "docs/**" push: + paths-ignore: + - ".github/workflows/docs-build.yml" + - "docs/**" branches: - main