Skip to content

Commit fcf905e

Browse files
committed
chore: deploy dokka website action
1 parent 1aca84c commit fcf905e

File tree

3 files changed

+30
-18
lines changed

3 files changed

+30
-18
lines changed

.github/workflows/build.yml

Lines changed: 22 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,10 @@ jobs:
5555
cmd: ./gradlew.bat
5656

5757
steps:
58-
- name: Check out the source code
58+
- name: 🛎️ Check out the source code
5959
uses: actions/checkout@v2
60+
with:
61+
fetch-depth: 100
6062

6163
- name: Download ${{ matrix.os }} OpenJDK ${{ matrix.jdk }}
6264
id: download-jdk
@@ -94,7 +96,7 @@ jobs:
9496
echo "::set-output name=name::$NAME"
9597
echo "::set-output name=artifact::$ARTIFACT"
9698
97-
- name: Publish to GitHub Packages (Linux)
99+
- name: 📦 Publish to GitHub Packages (Linux)
98100
id: gradle-publish
99101
if: env.GITHUB_PUBLISH == 'true' && runner.os == 'Linux'
100102
run: |
@@ -103,9 +105,9 @@ jobs:
103105
GITHUB_USER: ${{ github.repository_owner }}
104106
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
105107

106-
- name: Gradle Run & Build
108+
- name: 🔧 Gradle Run & Build
107109
id: gradle-build
108-
run: ./gradlew run build
110+
run: ./gradlew run build dokkaHtml
109111

110112
- name: Uploading ${{ matrix.os }} uber jar
111113
if: steps.gradle-build.outcome == 'success' && runner.os == 'Linux'
@@ -116,6 +118,16 @@ jobs:
116118
${{ steps.gradle-build.outputs.uberjar_path }}
117119
if-no-files-found: error
118120

121+
- name: 🚀 Deploy html docs to website
122+
if: runner.os == 'Linux'
123+
uses: JamesIves/github-pages-deploy-action@releases/v3
124+
with:
125+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
126+
BRANCH: main
127+
FOLDER: build/dokka
128+
TARGET_FOLDER: docs/apidoc/
129+
CLEAN: true
130+
119131
release:
120132
name: Release new version.
121133
needs: [ build ]
@@ -155,18 +167,21 @@ jobs:
155167
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
156168

157169
container-build:
158-
name: Run Java on Container
170+
name: 🚢 Run Java on Container
159171
runs-on: ubuntu-latest
160172

161173
strategy:
162174
fail-fast: true
163175
matrix:
164-
jdk: [ "17-slim-buster", "17-alpine" ]
176+
jdk: [ "openjdk:17-slim-buster", "openjdk:17-alpine" ]
165177

178+
defaults:
179+
run:
180+
shell: sh
166181

167182
container:
168183
# openjdk:17-jdk-alpine
169-
image: openjdk:${{ matrix.jdk }}
184+
image: ${{ matrix.jdk }}
170185

171186
steps:
172187
- name: Check out the source code
@@ -178,7 +193,6 @@ jobs:
178193
java --show-version src/main/java/JavaApp.java
179194
env:
180195
RUNNER_CONTEXT: ${{ toJson(runner) }}
181-
shell: sh
182196

183197
- name: Github Action Contexts
184198
run: |
@@ -189,4 +203,3 @@ jobs:
189203
JOB_CONTEXT: ${{ toJson(job) }}
190204
STEPS_CONTEXT: ${{ toJson(steps) }}
191205
RUNNER_CONTEXT: ${{ toJson(runner) }}
192-
shell: sh

build.gradle.kts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
import gg.jte.*
2+
import java.net.*
3+
import java.nio.file.Path
24
import org.gradle.api.tasks.testing.logging.*
35
import org.gradle.internal.os.OperatingSystem
46
import org.jetbrains.dokka.gradle.*
57
import org.jetbrains.kotlin.config.*
68
import org.jetbrains.kotlin.gradle.tasks.*
7-
import java.net.*
8-
import java.nio.file.Path
99

1010
plugins {
1111
idea
@@ -178,7 +178,7 @@ spotless {
178178
endWithNewline()
179179
indentWithSpaces()
180180
trimTrailingWhitespace()
181-
// licenseHeader(License.Apache)
181+
//licenseHeader(rootProject.file("gradle/license-header.txt"))
182182
}
183183

184184
kotlinGradle {

docs/JDK Commands.md

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -129,10 +129,9 @@ $ java --enable-preview \
129129
```
130130

131131
* [JPMS Quickstart](https://openjdk.java.net/projects/jigsaw/quick-start)
132-
133132
* [Docs and Resources](https://openjdk.java.net/projects/jigsaw/)
134-
135133
* **[Java Modules Cheat Sheet](https://nipafx.dev/build-modules/)**
134+
* [JPackage Scripts](https://github.com/dlemmermann/JPackageScriptFX)
136135

137136
##### 9. [JVMCI (Graal) Compiler](https://openjdk.java.net/jeps/317)
138137

@@ -302,13 +301,13 @@ println("Hello Kotlin Script")
302301
```bash
303302
# Turn on all debugging
304303
$ java -Djavax.net.debug=all
305-
304+
306305
# Override HostsFileNameService
307306
$ java -Djdk.net.hosts.file=/etc/host/style/file
308-
307+
309308
# Force IPv4
310309
$ java -Djava.net.preferIPv4Stack=true
311-
310+
312311
# The entropy gathering device can also be specified with the system property
313312
$ java -Djava.security.egd=file:/dev/./urandom
314313
```
@@ -473,7 +472,7 @@ sourceSets.main.get().compileClasspath
473472
val u: TaskProvider<Jar> = register<Jar>("jar"){} // Create new task
474473
val v: TaskProvider<Jar> by registering(Jar::class){} // Create task using property delegate
475474
val jar: TaskProvider<Task> by existing // Get task using property delegate
476-
475+
477476
val foo: FooTask by existing // Take Task type from val (Kotlin 1.4)
478477
val bar: BarTask by registering {} // Take Task type from val (Kotlin 1.4)
479478
```

0 commit comments

Comments
 (0)