From f736ad7202b7a4d7a95ae410aa6cca849393aff2 Mon Sep 17 00:00:00 2001 From: theOehrly <23384863+theOehrly@users.noreply.github.com> Date: Tue, 30 Jul 2024 18:02:18 +0200 Subject: [PATCH] CI/FIX: improve and fix actions [skip-pytest] --- .github/workflows/docs.yml | 10 ++++++++-- .github/workflows/tests.yml | 4 ++++ 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 284d73d0f..69235a224 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -18,6 +18,7 @@ env: jobs: build_docs: + if: (!contains(github.event.head_commit.message, '[skip-doc-build]')) || inputs.publish name: Build Documentation runs-on: ubuntu-latest steps: @@ -79,14 +80,19 @@ jobs: make clean make html - - name: Publish docs - if: (github.event_name == 'release') || inputs.publish + - name: Prepare docs for publishing run: | cd docs/_build/html + git --version + git status git add . git config user.name github-actions git config user.email github-actions@github.com git commit -m "$GITHUB_REF_NAME ($GITHUB_JOB) ci release" + + - name: Publish docs + if: (github.event_name == 'release') || inputs.publish + run: | git push origin gh-pages --force - name: Upload docs as artifact diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 2fe9f05ea..14e6b22ed 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -15,6 +15,7 @@ env: jobs: run-code-tests: + if: (!contains(github.event.head_commit.message, '[skip-pytest]')) runs-on: ubuntu-latest strategy: fail-fast: false @@ -75,6 +76,7 @@ jobs: run-lint-checks: + if: (!contains(github.event.head_commit.message, '[skip-ruff]')) runs-on: ubuntu-latest name: Linting (Ruff) steps: @@ -111,6 +113,7 @@ jobs: run-isort-test: + if: (!contains(github.event.head_commit.message, '[skip-isort]')) name: Test import order (isort) runs-on: ubuntu-latest @@ -141,6 +144,7 @@ jobs: python -m isort . --check-only run-readme-render-test: + if: (!contains(github.event.head_commit.message, '[skip-readme-test]')) name: Test readme renders on PyPi runs-on: ubuntu-latest