From 01e1b6bcd85bee6498bcaf05937220f20bef3405 Mon Sep 17 00:00:00 2001 From: Tom Kralidis Date: Fri, 17 May 2024 03:24:41 -0400 Subject: [PATCH] CI: split docs into separate GitHub Action (#1660) --- .github/workflows/docs.yml | 36 ++++++++++++++++++++++++++++++++++++ .github/workflows/main.yml | 5 ++--- docs/source/index.rst | 1 - 3 files changed, 38 insertions(+), 4 deletions(-) create mode 100644 .github/workflows/docs.yml diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml new file mode 100644 index 0000000..0da62d0 --- /dev/null +++ b/.github/workflows/docs.yml @@ -0,0 +1,36 @@ +name: Build documentation ⚙️ + +on: + push: + branches: + - master + paths: + - 'docs/**' + pull_request: + branches: + - master + paths: + - 'docs/**' + release: + types: + - released + +jobs: + main: + runs-on: ubuntu-22.04 + strategy: + matrix: + include: + - python-version: '3.10' + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-python@v2 + name: Setup Python ${{ matrix.python-version }} + with: + python-version: ${{ matrix.python-version }} + - name: Install requirements 📦 + run: | + pip3 install -r requirements.txt + pip3 install -r docs/requirements.txt + - name: build docs 🏗️ + run: cd docs && make html diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 3368f98..6dd5614 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -4,11 +4,13 @@ on: push: paths-ignore: - '**.md' + - 'docs/**' pull_request: branches: - master paths-ignore: - '!**.md' + - 'docs/**' release: types: - released @@ -90,7 +92,6 @@ jobs: pip3 install -r requirements-dev.txt pip3 install -r requirements-provider.txt pip3 install -r requirements-django.txt - pip3 install -r docs/requirements.txt python3 setup.py install pip3 install --upgrade numpy elasticsearch pip3 install --upgrade numpy "sqlalchemy<2" @@ -139,8 +140,6 @@ jobs: pytest tests/test_util.py pytest tests/test_xarray_netcdf_provider.py pytest tests/test_xarray_zarr_provider.py - - name: build docs 🏗️ - run: cd docs && make html - name: failed tests 🚩 if: ${{ failure() }} run: | diff --git a/docs/source/index.rst b/docs/source/index.rst index 1b6ab82..d4c958c 100644 --- a/docs/source/index.rst +++ b/docs/source/index.rst @@ -51,7 +51,6 @@ reference documentation on all aspects of the project. support further-reading license - api-documentation Indices and tables