From c15cc8f4078b44b94de0cfaeb34905dea1ce4875 Mon Sep 17 00:00:00 2001 From: Ilya Sytchev Date: Wed, 18 Oct 2023 17:30:20 -0400 Subject: [PATCH] Factor our docs build job into a workflow --- .github/workflows/build.yml | 33 +++++++++++---------------------- .github/workflows/docs.yml | 26 ++++++++++++++++++++++++++ 2 files changed, 37 insertions(+), 22 deletions(-) create mode 100644 .github/workflows/docs.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index b10539bb..14b30dc3 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,18 +1,23 @@ # Install Python dependencies and run tests +name: 'Build and test' -name: build - -on: push +on: + push: + paths-ignore: + - 'docs/**' + - 'CITATION.cff' + workflow_dispatch: jobs: - build: + build-and-test: + name: 'Build and test' runs-on: ${{ matrix.os }} strategy: matrix: os: ['ubuntu-22.04', 'windows-2022', 'macos-12'] steps: - - name: Checkout Forest code from GitHub repo - uses: actions/checkout@v3 + - name: Check out Forest code + uses: actions/checkout@v4 - name: Set up Python uses: actions/setup-python@v4 with: @@ -35,19 +40,3 @@ jobs: run: python -m unittest tests/imports.py - name: Run pytest suite run: pytest - build_docs: - runs-on: ubuntu-22.04 - defaults: - run: - working-directory: ./docs - steps: - - name: Checkout Forest code from GitHub repo - uses: actions/checkout@v3 - - name: Set up Python - uses: actions/setup-python@v4 - with: - python-version: 3.8 - - name: Install documentation build dependencies - run: pip install -r requirements.txt - - name: Build the docs - run: make html SPHINXOPTS="-W" diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml new file mode 100644 index 00000000..e25aab62 --- /dev/null +++ b/.github/workflows/docs.yml @@ -0,0 +1,26 @@ +name: Docs + +on: + push: + paths: + - 'docs/**' + workflow_dispatch: + +jobs: + build-html-docs: + name: 'Build HTML docs' + runs-on: 'ubuntu-22.04' + defaults: + run: + working-directory: './docs' + steps: + - name: Check out Forest code + uses: actions/checkout@v4 + - name: Set up Python + uses: actions/setup-python@v4 + with: + python-version: 3.8 + - name: Install documentation build dependencies + run: pip install -r requirements.txt + - name: Build HTML docs + run: make html SPHINXOPTS="-W"