Skip to content

Commit

Permalink
[build] fix deployment of documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
fab1an committed May 5, 2024
1 parent d011116 commit d32f7d5
Show file tree
Hide file tree
Showing 95 changed files with 17 additions and 8,728 deletions.
13 changes: 9 additions & 4 deletions .github/workflows/build-master.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,17 +35,22 @@ jobs:
run: ./gradlew build

- name: Build documentation
run: ./gradlew dokkaHtml
run: ./gradlew buildDocumentation

- name: Set env.VERSION from dokka version.json
- name: Check repository for commits
run: |
echo "VERSION=$(cat ./build/dokka/html/version.json | jq -r '.version')" >> "$GITHUB_ENV"
if [ -n "$(git status --porcelain)" ]; then
echo "there are changes"
exit 1
else
echo "no changes"
fi
- uses: actions/configure-pages@v3

- uses: actions/upload-pages-artifact@v1
with:
path: 'documentation/${{env.VERSION}}'
path: 'build/dokka/html'

- name: Deploy to Documentation GitHub Pages
id: deployment
Expand Down
15 changes: 8 additions & 7 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -77,13 +77,14 @@ tasks.withType(DokkaTask.class) {

task buildDocumentation(dependsOn: ['dokkaHtml']) {
doLast {
delete("${project.rootDir}/documentation/${project.version}")
copy {
from "${project.buildDir}/dokka/html"
into "${project.rootDir}/documentation/${project.version}"
if (!project.version.toString().endsWith("-SNAPSHOT")) {
delete("${project.rootDir}/documentation/${project.version}")
copy {
from "${project.buildDir}/dokka/html"
into "${project.rootDir}/documentation/${project.version}"
}
delete("${project.rootDir}/documentation/${project.version}/older")
}
delete("${project.rootDir}/documentation/${project.version}/older")
file("${project.rootDir}/documentation/test").createNewFile()
}
}

build.dependsOn(buildDocumentation)
8 changes: 0 additions & 8 deletions documentation/1.2.0-SNAPSHOT/images/anchor-copy-button.svg

This file was deleted.

7 changes: 0 additions & 7 deletions documentation/1.2.0-SNAPSHOT/images/arrow_down.svg

This file was deleted.

9 changes: 0 additions & 9 deletions documentation/1.2.0-SNAPSHOT/images/burger.svg

This file was deleted.

7 changes: 0 additions & 7 deletions documentation/1.2.0-SNAPSHOT/images/copy-icon.svg

This file was deleted.

7 changes: 0 additions & 7 deletions documentation/1.2.0-SNAPSHOT/images/copy-successful-icon.svg

This file was deleted.

7 changes: 0 additions & 7 deletions documentation/1.2.0-SNAPSHOT/images/footer-go-to-link.svg

This file was deleted.

8 changes: 0 additions & 8 deletions documentation/1.2.0-SNAPSHOT/images/go-to-top-icon.svg

This file was deleted.

14 changes: 0 additions & 14 deletions documentation/1.2.0-SNAPSHOT/images/logo-icon.svg

This file was deleted.

This file was deleted.

20 changes: 0 additions & 20 deletions documentation/1.2.0-SNAPSHOT/images/nav-icons/abstract-class.svg

This file was deleted.

This file was deleted.

7 changes: 0 additions & 7 deletions documentation/1.2.0-SNAPSHOT/images/nav-icons/annotation.svg

This file was deleted.

13 changes: 0 additions & 13 deletions documentation/1.2.0-SNAPSHOT/images/nav-icons/class-kotlin.svg

This file was deleted.

7 changes: 0 additions & 7 deletions documentation/1.2.0-SNAPSHOT/images/nav-icons/class.svg

This file was deleted.

13 changes: 0 additions & 13 deletions documentation/1.2.0-SNAPSHOT/images/nav-icons/enum-kotlin.svg

This file was deleted.

7 changes: 0 additions & 7 deletions documentation/1.2.0-SNAPSHOT/images/nav-icons/enum.svg

This file was deleted.

This file was deleted.

10 changes: 0 additions & 10 deletions documentation/1.2.0-SNAPSHOT/images/nav-icons/field-value.svg

This file was deleted.

10 changes: 0 additions & 10 deletions documentation/1.2.0-SNAPSHOT/images/nav-icons/field-variable.svg

This file was deleted.

7 changes: 0 additions & 7 deletions documentation/1.2.0-SNAPSHOT/images/nav-icons/function.svg

This file was deleted.

13 changes: 0 additions & 13 deletions documentation/1.2.0-SNAPSHOT/images/nav-icons/interface-kotlin.svg

This file was deleted.

7 changes: 0 additions & 7 deletions documentation/1.2.0-SNAPSHOT/images/nav-icons/interface.svg

This file was deleted.

Loading

0 comments on commit d32f7d5

Please sign in to comment.