Skip to content

Commit 1870a53

Browse files
committed
Integrate gorm-docs into grails-data-mapping
1 parent 5678c57 commit 1870a53

File tree

94 files changed

+276
-1143
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

94 files changed

+276
-1143
lines changed

.github/workflows/gradle.yml

Lines changed: 35 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,40 @@ jobs:
6363
# NOTE: secrets.MAVEN_PUBLISH_URL == https://repo.grails.org/grails/plugins3-snapshot-local
6464
MAVEN_PUBLISH_URL: https://repo.grails.org/grails/libs-snapshots-local
6565
run: ./gradlew --no-build-cache publish
66+
docs:
67+
if: github.event_name == 'push'
68+
needs: publish
69+
runs-on: ubuntu-24.04
70+
permissions:
71+
contents: write
72+
packages: read
73+
steps:
74+
- name: "📥 Checkout the repository"
75+
uses: actions/checkout@v4
76+
- name: "☕️ Setup JDK"
77+
uses: actions/setup-java@v4
78+
with:
79+
distribution: 'liberica'
80+
java-version: '17'
81+
- name: "🐘 Setup Gradle"
82+
uses: gradle/actions/setup-gradle@v4
83+
with:
84+
develocity-access-key: ${{ secrets.DEVELOCITY_ACCESS_KEY }}
85+
- name: "🔨 Build Docs"
86+
id: docs
87+
env:
88+
GITHUB_MAVEN_PASSWORD: ${{ secrets.GITHUB_TOKEN }}
89+
run: ./gradlew docs --refresh-dependencies
90+
- name: "📤 Publish docs to Github Pages"
91+
if: steps.docs.outcome == 'success'
92+
uses: grails/github-pages-deploy-action@v2
93+
env:
94+
TARGET_REPOSITORY: ${{ github.repository }}
95+
GH_TOKEN: ${{ secrets.GH_TOKEN }}
96+
BRANCH: gh-pages
97+
FOLDER: build/docs
98+
COMMIT_EMAIL: ${{ env.GIT_USER_EMAIL }}
99+
COMMIT_NAME: ${{ env.GIT_USER_NAME }}
66100
trigger-build-gorm-impls:
67101
if: github.event_name == 'push'
68102
name: "Trigger Build in GORM Implementations"
@@ -104,12 +138,4 @@ jobs:
104138
repo: grails/gorm-mongodb
105139
ref: ${{ steps.extract_branch.outputs.value }}
106140
token: ${{ secrets.GH_TOKEN }}
107-
inputs: ${{ steps.dispatch_message.outputs.value }}
108-
- name: "📡 Invoke the Java CI workflow in GORM Neo4j"
109-
continue-on-error: true
110-
uses: benc-uk/workflow-dispatch@e2e5e9a103e331dad343f381a29e654aea3cf8fc # v1.2.4 (Use commit sha as this is a 3rd party action)
111-
with:
112-
workflow: Java CI
113-
repo: grails/gorm-neo4j
114-
ref: ${{ steps.extract_branch.outputs.value }}
115-
token: ${{ secrets.GH_TOKEN }}
141+
inputs: ${{ steps.dispatch_message.outputs.value }}

.github/workflows/release.yml

Lines changed: 26 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -112,18 +112,31 @@ jobs:
112112
contents: write
113113
packages: read
114114
steps:
115-
- name: "📝 Create Message for the GORM Documentation Release"
116-
id: gorm_docs_release_message
115+
- name: "📥 Checkout repository"
116+
uses: actions/checkout@v4
117+
with:
118+
ref: v${{ needs.publish.outputs.release_version }}
119+
- name: "☕️ Setup JDK"
120+
uses: actions/setup-java@v4
121+
with:
122+
distribution: 'liberica'
123+
java-version: '17'
124+
- name: "🐘 Setup Gradle"
125+
uses: gradle/actions/setup-gradle@v4
126+
with:
127+
develocity-access-key: ${{ secrets.DEVELOCITY_ACCESS_KEY }}
128+
- name: "📖 Generate documentation"
117129
env:
118-
RELEASE_VERSION: ${{ needs.publish.outputs.release_version }}
119-
run: echo "value={\"gorm_version\":\"$RELEASE_VERSION\"}" >> $GITHUB_OUTPUT
120-
- name: "📡 Invoke gorm-docs release workflow"
130+
GITHUB_MAVEN_PASSWORD: ${{ secrets.GITHUB_TOKEN }}
131+
run: ./gradlew docs
132+
- name: "📤 Publish documentation to Github Pages"
121133
if: success()
122-
id: gorm_docs
123-
uses: benc-uk/workflow-dispatch@e2e5e9a103e331dad343f381a29e654aea3cf8fc # v1.2.4 (Use commit sha as this is a 3rd party action)
124-
with:
125-
workflow: Release
126-
repo: grails/gorm-docs
127-
ref: ${{ needs.publish.outputs.target_branch }}
128-
token: ${{ secrets.GH_TOKEN }}
129-
inputs: ${{ steps.gorm_docs_release_message.outputs.value }}
134+
uses: grails/github-pages-deploy-action@grails
135+
env:
136+
BETA: ${{ contains(needs.publish.outputs.release_version, 'M') || contains(needs.publish.outputs.release_version, 'RC') }}
137+
GH_TOKEN: ${{ secrets.GH_TOKEN }}
138+
BRANCH: gh-pages
139+
FOLDER: build/docs
140+
VERSION: ${{ needs.publish.outputs.release_version }}
141+
COMMIT_EMAIL: ${{ env.GIT_USER_EMAIL }}
142+
COMMIT_NAME: ${{ env.GIT_USER_NAME }}

build.gradle

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,4 @@ allprojects {
4646
}
4747
}
4848

49-
tasks.register('clean', Delete) {
50-
group = 'build'
51-
delete layout.buildDirectory
52-
}
49+
apply from: layout.projectDirectory.file('gradle/documentation-config.gradle')

docs/.github/actions/tag-and-release/Dockerfile

Lines changed: 0 additions & 10 deletions
This file was deleted.

docs/.github/actions/tag-and-release/action.yml

Lines changed: 0 additions & 16 deletions
This file was deleted.

docs/.github/actions/tag-and-release/entrypoint.sh

Lines changed: 0 additions & 38 deletions
This file was deleted.

docs/.github/workflows/gradle.yml

Lines changed: 0 additions & 48 deletions
This file was deleted.

docs/.github/workflows/release.yml

Lines changed: 0 additions & 90 deletions
This file was deleted.

0 commit comments

Comments
 (0)