Skip to content

Commit 17ecfcb

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

File tree

95 files changed

+273
-1134
lines changed

Some content is hidden

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

95 files changed

+273
-1134
lines changed

.github/workflows/gradle.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ on:
66
pull_request:
77
branches:
88
- '[7-9]+.[0-9]+.x'
9+
env:
10+
GIT_USER_NAME: grails-build
11+
GIT_USER_EMAIL: [email protected]
912
jobs:
1013
build:
1114
name: "Build Project"
@@ -63,6 +66,39 @@ jobs:
6366
# NOTE: secrets.MAVEN_PUBLISH_URL == https://repo.grails.org/grails/plugins3-snapshot-local
6467
MAVEN_PUBLISH_URL: https://repo.grails.org/grails/libs-snapshots-local
6568
run: ./gradlew --no-build-cache publish
69+
docs:
70+
if: github.event_name == 'push'
71+
needs: publish
72+
runs-on: ubuntu-24.04
73+
permissions:
74+
contents: write
75+
packages: read
76+
steps:
77+
- name: "📥 Checkout the repository"
78+
uses: actions/checkout@v4
79+
- name: "☕️ Setup JDK"
80+
uses: actions/setup-java@v4
81+
with:
82+
distribution: 'liberica'
83+
java-version: '17'
84+
- name: "🐘 Setup Gradle"
85+
uses: gradle/actions/setup-gradle@v4
86+
with:
87+
develocity-access-key: ${{ secrets.DEVELOCITY_ACCESS_KEY }}
88+
- name: "🔨 Build Docs"
89+
id: docs
90+
env:
91+
GITHUB_MAVEN_PASSWORD: ${{ secrets.GITHUB_TOKEN }}
92+
run: ./gradlew docs --refresh-dependencies
93+
- name: "📤 Publish docs to Github Pages"
94+
if: steps.docs.outcome == 'success'
95+
uses: grails/github-pages-deploy-action@v2
96+
env:
97+
GH_TOKEN: ${{ secrets.GH_TOKEN }}
98+
BRANCH: gh-pages
99+
FOLDER: build/docs
100+
COMMIT_EMAIL: ${{ env.GIT_USER_EMAIL }}
101+
COMMIT_NAME: ${{ env.GIT_USER_NAME }}
66102
trigger-build-gorm-impls:
67103
if: github.event_name == 'push'
68104
name: "Trigger Build in GORM Implementations"
@@ -106,6 +142,7 @@ jobs:
106142
token: ${{ secrets.GH_TOKEN }}
107143
inputs: ${{ steps.dispatch_message.outputs.value }}
108144
- name: "📡 Invoke the Java CI workflow in GORM Neo4j"
145+
if: false # Skip until neo4j is ported to grails 7
109146
continue-on-error: true
110147
uses: benc-uk/workflow-dispatch@e2e5e9a103e331dad343f381a29e654aea3cf8fc # v1.2.4 (Use commit sha as this is a 3rd party action)
111148
with:

.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)