Publish KDoc to docs.openrs2.dev

Signed-off-by: Graham <gpe@openrs2.dev>
Graham 4 years ago
parent 06106938af
commit a235167b89
  1. 5
      .drone.yml
  2. 21
      build.gradle.kts

@ -11,12 +11,17 @@ steps:
- name: deploy - name: deploy
image: registry.openrs2.dev/openrs2-dev image: registry.openrs2.dev/openrs2-dev
commands: commands:
- install -dm0700 $${HOME}/.ssh
- echo -n "$${SSH_KEY}" > $${HOME}/.ssh/id_ed25519
- chmod 0600 $${HOME}/.ssh/id_ed25519
- ./gradlew --no-daemon publish - ./gradlew --no-daemon publish
environment: environment:
ORG_GRADLE_PROJECT_openrs2Username: ORG_GRADLE_PROJECT_openrs2Username:
from_secret: repo_username from_secret: repo_username
ORG_GRADLE_PROJECT_openrs2Password: ORG_GRADLE_PROJECT_openrs2Password:
from_secret: repo_password from_secret: repo_password
SSH_KEY:
from_secret: ssh_key
when: when:
branch: branch:
- master - master

@ -293,6 +293,10 @@ configure(subprojects.filter { it.isFree }) {
} }
} }
tasks.build {
dependsOn(":dokkaHtmlCollector")
}
val rejectVersionRegex = Regex("(?i)[._-](?:alpha|beta|rc|cr|m|dev)") val rejectVersionRegex = Regex("(?i)[._-](?:alpha|beta|rc|cr|m|dev)")
tasks.dependencyUpdates { tasks.dependencyUpdates {
@ -304,6 +308,23 @@ tasks.dependencyUpdates {
} }
} }
tasks.register("publish") {
dependsOn("publishDokka")
}
tasks.register<Exec>("publishDokka") {
dependsOn(":dokkaHtmlCollector")
commandLine(
"rsync",
"-e",
"ssh -oStrictHostKeyChecking=accept-new",
"-rtz",
"$buildDir/dokka/htmlCollector/",
"build@docs.openrs2.dev:/srv/www/docs"
)
}
tasks.wrapper { tasks.wrapper {
distributionType = Wrapper.DistributionType.ALL distributionType = Wrapper.DistributionType.ALL
} }

Loading…
Cancel
Save