Skip to content

Commit ec3881c

Browse files
committed
Publish documentation to docs.junit.org GitHub repo's main branch
(cherry picked from commit a5e8eb3)
1 parent 623191c commit ec3881c

File tree

3 files changed

+7
-12
lines changed

3 files changed

+7
-12
lines changed

.github/workflows/main.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -103,8 +103,6 @@ jobs:
103103
cancel-in-progress: true
104104
needs: macOS
105105
runs-on: ubuntu-latest
106-
permissions:
107-
contents: write
108106
steps:
109107
- name: Check out repository
110108
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
@@ -136,4 +134,4 @@ jobs:
136134
-Dscan.tag.Documentation
137135
env:
138136
GIT_USERNAME: git
139-
GIT_PASSWORD: ${{ secrets.GITHUB_TOKEN }}
137+
GIT_PASSWORD: ${{ secrets.JUNIT_BUILDS_GITHUB_TOKEN_DOCS_REPO }}

.github/workflows/release.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -180,8 +180,6 @@ jobs:
180180
name: Publish documentation
181181
needs: publish_deployment
182182
runs-on: ubuntu-latest
183-
permissions:
184-
contents: write
185183
steps:
186184
- name: Check out repository
187185
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
@@ -211,7 +209,7 @@ jobs:
211209
uses: ./.github/actions/run-gradle
212210
env:
213211
GIT_USERNAME: git
214-
GIT_PASSWORD: ${{ secrets.GITHUB_TOKEN }}
212+
GIT_PASSWORD: ${{ secrets.JUNIT_BUILDS_GITHUB_TOKEN_DOCS_REPO }}
215213
with:
216214
encryptionKey: ${{ secrets.GRADLE_ENCRYPTION_KEY }}
217215
arguments: |

documentation/documentation.gradle.kts

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -108,10 +108,9 @@ val ota4jDocVersion = libs.versions.opentest4j.map { if (it.isSnapshot()) "snaps
108108
val apiGuardianDocVersion = libs.versions.apiguardian.map { if (it.isSnapshot()) "snapshot" else it }.get()
109109

110110
gitPublish {
111-
repoUri = "https://github.com/junit-team/junit5.git"
112-
referenceRepoUri = rootDir.toURI().toString()
111+
repoUri = "https://github.com/junit-team/docs.junit.org.git"
113112

114-
branch = "gh-pages"
113+
branch = "main"
115114
sign = false
116115
fetchDepth = 1
117116

@@ -120,14 +119,14 @@ gitPublish {
120119

121120
contents {
122121
from(docsDir)
123-
into("docs")
122+
into(".")
124123
}
125124

126125
preserve {
127126
include("**/*")
128-
exclude("docs/$docsVersion/**")
127+
exclude("$docsVersion/**")
129128
if (replaceCurrentDocs) {
130-
exclude("docs/current/**")
129+
exclude("current/**")
131130
}
132131
}
133132
}

0 commit comments

Comments
 (0)