diff --git a/.github/workflows/docs-build-pr.yml b/.github/workflows/docs-build-pr.yml deleted file mode 100644 index b7f9599d31..0000000000 --- a/.github/workflows/docs-build-pr.yml +++ /dev/null @@ -1,60 +0,0 @@ - -name: Build docs - -on: - pull_request: - branches: [ master, 'maint/*' ] - -concurrency: - group: ${{ github.workflow }}-${{ github.ref }} - cancel-in-progress: true - -permissions: - contents: read - -jobs: - build: - if: "(github.repository_owner != 'nipreps') && !contains(github.event.head_commit.message, '[skip ci]')" - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v4 - with: - fetch-depth: 0 - - - name: Determine current branch/tag name - run: | - if [[ "$GITHUB_REF" == refs/pull/* ]]; then - CURBRANCH=${GITHUB_REF%/*} - CURBRANCH=${CURBRANCH##*/} - elif [[ "$GITHUB_REF" == refs/heads/* ]]; then - CURBRANCH=${GITHUB_REF##*/} - elif [[ "$GITHUB_REF" == refs/tags/* ]]; then - echo "This build should not be picking up a tag, cancelling." - exit 1 - fi - - # Remove forward slashes - CURBRANCH=$( echo $CURBRANCH | sed 's+/+_+g' ) - echo "Building branch/tag ${CURBRANCH:-}, from git ref <$GITHUB_REF>" - echo "CURBRANCH=${CURBRANCH}" >> ${GITHUB_ENV} - - - name: Set up Python 3 - uses: actions/setup-python@v5 - with: - python-version: 3 - - - name: Install GraphViz & pandoc - run: | - sudo apt-get update -y - sudo apt-get install -y --no-install-recommends graphviz pandoc - - - name: Install dependencies - run: | - python -m pip install -U build hatch hatchling pip docutils - python -m pip install -r docs/requirements.txt - python -m hatch version | tail -n1 | xargs - - - name: Build docs - run: | - make -C docs/ SPHINXOPTS="-W" BUILDDIR="$HOME/docs" OUTDIR="${CURBRANCH:-html}" html diff --git a/.github/workflows/docs-build-update.yml b/.github/workflows/docs-build-update.yml index 0eda2636b3..7f5a6d44da 100644 --- a/.github/workflows/docs-build-update.yml +++ b/.github/workflows/docs-build-update.yml @@ -5,6 +5,8 @@ on: push: branches: [ 'doc/*', 'docs/*', master, "maint/*" ] tags: [ '*' ] + pull_request: + branches: [ master, 'maint/*' ] concurrency: group: ${{ github.workflow }}-${{ github.ref }} @@ -12,6 +14,7 @@ concurrency: jobs: build: + if: ${{ github.event_name != 'pull_request' || !contains(github.event.head_commit.message, '[skip ci]')") }} runs-on: ubuntu-latest steps: