Skip to content

Commit a5e8eb3

Browse files
committed
Publish documentation to docs.junit.org GitHub repo's main branch
1 parent aec5727 commit a5e8eb3

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
@@ -109,10 +109,9 @@ val ota4jDocVersion = libs.versions.opentest4j.map { if (it.isSnapshot()) "snaps
109109
val apiGuardianDocVersion = libs.versions.apiguardian.map { if (it.isSnapshot()) "snapshot" else it }.get()
110110

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

115-
branch = "gh-pages"
114+
branch = "main"
116115
sign = false
117116
fetchDepth = 1
118117

@@ -121,14 +120,14 @@ gitPublish {
121120

122121
contents {
123122
from(docsDir)
124-
into("docs")
123+
into(".")
125124
}
126125

127126
preserve {
128127
include("**/*")
129-
exclude("docs/$docsVersion/**")
128+
exclude("$docsVersion/**")
130129
if (replaceCurrentDocs) {
131-
exclude("docs/current/**")
130+
exclude("current/**")
132131
}
133132
}
134133
}

0 commit comments

Comments
 (0)