diff --git a/.github/workflows/push-documentation.yml b/.github/workflows/push-documentation.yml index f8a6652ca..56831a966 100644 --- a/.github/workflows/push-documentation.yml +++ b/.github/workflows/push-documentation.yml @@ -21,6 +21,8 @@ jobs: cd docs ./gradlew --console=plain -q combineDocs - name: Publish documentation + env: + CI_BRANCH: ${{ github.ref_name }} run: | cd docs ./gradlew --console=plain --info :antora:publishDocs :gh-pages:publishDocs \ diff --git a/docs/antora/build.gradle b/docs/antora/build.gradle index 71c92dcfa..344af7290 100644 --- a/docs/antora/build.gradle +++ b/docs/antora/build.gradle @@ -3,7 +3,7 @@ plugins { } ext { - currentBranch = System.getenv('TRAVIS_BRANCH') ?: 'not-on-travis-ci' + currentBranch = System.getenv('CI_BRANCH') ?: 'not-on-ci' pushDocs = currentBranch.matches(~/^(master|development-3.x|maintenance-1.5|maintenance-1.6)$/) } @@ -36,7 +36,7 @@ gitPublish { } task publishDocs { - if(pushDocs) { + if (pushDocs) { dependsOn gitPublishPush } doFirst { diff --git a/docs/gh-pages/build.gradle b/docs/gh-pages/build.gradle index 0b23b76ce..a99c14873 100644 --- a/docs/gh-pages/build.gradle +++ b/docs/gh-pages/build.gradle @@ -3,7 +3,7 @@ plugins { } ext { - currentBranch = System.getenv('TRAVIS_BRANCH') ?: 'not-on-travis-ci' + currentBranch = System.getenv('CI_BRANCH') ?: 'not-on-ci' pushDocs = currentBranch.matches(~/^master|development-.+|maintenance-.+$/) } @@ -25,7 +25,7 @@ gitPublish { } task publishDocs { - if(pushDocs) { + if (pushDocs) { dependsOn gitPublishPush } doFirst {