File tree 14 files changed +110
-8
lines changed
14 files changed +110
-8
lines changed Original file line number Diff line number Diff line change
1
+ name : Deploy Kover Docs
2
+
3
+ on :
4
+ # Runs on pushes targeting the release branch
5
+ push :
6
+ branches : ["release"]
7
+
8
+ # Allows you to run this workflow manually from the Actions tab
9
+ workflow_dispatch :
10
+
11
+ # Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
12
+ permissions :
13
+ contents : read
14
+ pages : write
15
+ id-token : write
16
+
17
+ # Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
18
+ # However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
19
+ concurrency :
20
+ group : " pages"
21
+ cancel-in-progress : false
22
+
23
+ jobs :
24
+ # Docs build job
25
+ build :
26
+ runs-on : ubuntu-latest
27
+ steps :
28
+ - name : Checkout Kover
29
+ uses : actions/checkout@v4
30
+ - name : Install Java
31
+ uses : actions/setup-java@v4
32
+ with :
33
+ distribution : ' zulu'
34
+ java-version : 17
35
+ cache : ' gradle'
36
+ - name : Install Gradle
37
+ uses : gradle/gradle-build-action@v2
38
+ with :
39
+ gradle-home-cache-cleanup : true
40
+ - name : Prepare Kover docs sources
41
+ run : ./gradlew releaseDocs
42
+ - name : Setup Pages
43
+ uses : actions/configure-pages@v4
44
+ - name : Build with Jekyll
45
+ uses : actions/jekyll-build-pages@v1
46
+ with :
47
+ source : docs
48
+ destination : ./_site
49
+ - name : Upload artifact
50
+ uses : actions/upload-pages-artifact@v3
51
+
52
+ # Deployment job
53
+ deploy :
54
+ environment :
55
+ name : github-pages
56
+ url : ${{ steps.deployment.outputs.page_url }}
57
+ runs-on : ubuntu-latest
58
+ needs : build
59
+ steps :
60
+ - name : Deploy to GitHub Pages
61
+ id : deployment
62
+ uses : actions/deploy-pages@v4
Original file line number Diff line number Diff line change 1
1
remote_theme :
pages-themes/[email protected]
2
+ plugins :
3
+ - jekyll-remote-theme # add this line to the plugins list if you already have one
2
4
lsi : false
3
5
safe : true
4
- source : /
5
6
highlighter : rouge
6
7
incremental : false
7
8
gist :
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -63,3 +63,17 @@ tasks.jar {
63
63
repositories {
64
64
mavenCentral()
65
65
}
66
+
67
+ tasks.register(" releaseDocs" ) {
68
+ val dirName = " cli"
69
+ val description = " Kover Command Line Interface"
70
+ val sourceDir = projectDir.resolve(" docs" )
71
+ val resultDir = rootDir.resolve(" docs/$dirName " )
72
+ val mainIndexFile = rootDir.resolve(" docs/index.md" )
73
+
74
+ doLast {
75
+ resultDir.mkdirs()
76
+ sourceDir.copyRecursively(resultDir)
77
+ mainIndexFile.appendText(" - [$description ]($dirName )\n " )
78
+ }
79
+ }
File renamed without changes.
Original file line number Diff line number Diff line change @@ -146,11 +146,9 @@ afterEvaluate {
146
146
147
147
tasks.dokkaHtml {
148
148
moduleName.set(" Kover Gradle Plugin" )
149
- outputDirectory.set(rootProject.layout.projectDirectory.dir (" docs/gradle-plugin/ dokka" ).asFile )
149
+ outputDirectory.set(projectDir.resolve (" docs/dokka" ))
150
150
151
- if (project.hasProperty(" releaseVersion" )) {
152
- moduleVersion.set(project.property(" releaseVersion" ) as String )
153
- }
151
+ moduleVersion.set(project.property(" kover.release.version" ).toString())
154
152
155
153
dokkaSourceSets.configureEach {
156
154
// source set configuration section
@@ -165,6 +163,22 @@ tasks.dokkaHtml {
165
163
}
166
164
}
167
165
166
+ tasks.register(" releaseDocs" ) {
167
+ val dirName = " gradle-plugin"
168
+ val description = " Kover Gradle Plugin"
169
+ val sourceDir = projectDir.resolve(" docs" )
170
+ val resultDir = rootDir.resolve(" docs/$dirName " )
171
+ val mainIndexFile = rootDir.resolve(" docs/index.md" )
172
+
173
+ dependsOn(tasks.dokkaHtml)
174
+
175
+ doLast {
176
+ resultDir.mkdirs()
177
+ sourceDir.copyRecursively(resultDir)
178
+ mainIndexFile.appendText(" - [$description ]($dirName )\n " )
179
+ }
180
+ }
181
+
168
182
extensions.configure<Kover_publishing_conventions_gradle .KoverPublicationExtension > {
169
183
description.set(" Kover Gradle Plugin - Kotlin code coverage" )
170
184
// `java-gradle-plugin` plugin already creates publication with name `pluginMaven`
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change @@ -51,3 +51,17 @@ tasks.jar {
51
51
exclude(" classpath.index" )
52
52
}
53
53
}
54
+
55
+ tasks.register(" releaseDocs" ) {
56
+ val dirName = " offline-instrumentation"
57
+ val description = " Kover offline instrumentation"
58
+ val sourceDir = projectDir.resolve(" docs" )
59
+ val resultDir = rootDir.resolve(" docs/$dirName " )
60
+ val mainIndexFile = rootDir.resolve(" docs/index.md" )
61
+
62
+ doLast {
63
+ resultDir.mkdirs()
64
+ sourceDir.copyRecursively(resultDir)
65
+ mainIndexFile.appendText(" - [$description ]($dirName )\n " )
66
+ }
67
+ }
File renamed without changes.
You can’t perform that action at this time.
0 commit comments