Skip to content

Commit

Permalink
Update rules to detect CI run to publish docs (#717)
Browse files Browse the repository at this point in the history
  • Loading branch information
abelsromero authored Feb 19, 2024
1 parent 131bc74 commit b99ef7b
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/push-documentation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand Down
4 changes: 2 additions & 2 deletions docs/antora/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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)$/)
}

Expand Down Expand Up @@ -36,7 +36,7 @@ gitPublish {
}

task publishDocs {
if(pushDocs) {
if (pushDocs) {
dependsOn gitPublishPush
}
doFirst {
Expand Down
4 changes: 2 additions & 2 deletions docs/gh-pages/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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-.+$/)
}

Expand All @@ -25,7 +25,7 @@ gitPublish {
}

task publishDocs {
if(pushDocs) {
if (pushDocs) {
dependsOn gitPublishPush
}
doFirst {
Expand Down

0 comments on commit b99ef7b

Please sign in to comment.