Skip to content

Commit 51b969d

Browse files
committed
Deploy docs if exists in src/main/asciidoc
1 parent dc85275 commit 51b969d

File tree

2 files changed

+21
-17
lines changed

2 files changed

+21
-17
lines changed

.github/workflows/gradle.yml

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -62,11 +62,13 @@ jobs:
6262
MAVEN_PUBLISH_PASSWORD: ${{ secrets.MAVEN_PUBLISH_PASSWORD }}
6363
MAVEN_PUBLISH_URL: 'https://repo.grails.org/artifactory/plugins3-snapshots-local'
6464
run: ./gradlew publish
65-
# - name: "📖 Generate Snapshot Documentation"
66-
# run: ./gradlew docs
67-
# - name: "📤 Publish Snapshot Documentation to Github Pages"
68-
# uses: apache/grails-github-actions/deploy-github-pages@asf
69-
# env:
70-
# GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
71-
# GRADLE_PUBLISH_RELEASE: 'false'
72-
# SOURCE_FOLDER: build/docs
65+
- name: "📖 Generate Snapshot Documentation"
66+
if: ${{ hashFiles('src/main/asciidoc/**') != '' }}
67+
run: ./gradlew docs
68+
- name: "📤 Publish Snapshot Documentation to Github Pages"
69+
if: ${{ hashFiles('src/main/asciidoc/**') != '' }}
70+
uses: apache/grails-github-actions/deploy-github-pages@asf
71+
env:
72+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
73+
GRADLE_PUBLISH_RELEASE: 'false'
74+
SOURCE_FOLDER: build/docs

.github/workflows/release.yml

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -117,14 +117,16 @@ jobs:
117117
./gradlew
118118
findSonatypeStagingRepository
119119
releaseSonatypeStagingRepository
120-
# - name: "📖 Generate Documentation"
121-
# run: ./gradlew docs
122-
# - name: "📤 Publish Documentation to Github Pages"
123-
# uses: apache/grails-github-actions/deploy-github-pages@asf
124-
# env:
125-
# GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
126-
# GRADLE_PUBLISH_RELEASE: 'true'
127-
# SOURCE_FOLDER: build/docs
128-
# VERSION: ${{ needs.publish.outputs.release_version }}
120+
- name: "📖 Generate Documentation"
121+
if: ${{ hashFiles('src/main/asciidoc/**') != '' }}
122+
run: ./gradlew docs
123+
- name: "📤 Publish Documentation to Github Pages"
124+
uses: apache/grails-github-actions/deploy-github-pages@asf
125+
if: ${{ hashFiles('src/main/asciidoc/**') != '' }}
126+
env:
127+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
128+
GRADLE_PUBLISH_RELEASE: 'true'
129+
SOURCE_FOLDER: build/docs
130+
VERSION: ${{ needs.publish.outputs.release_version }}
129131
- name: "⚙️ Run post-release"
130132
uses: apache/grails-github-actions/post-release@asf

0 commit comments

Comments
 (0)