File tree Expand file tree Collapse file tree 3 files changed +48
-3
lines changed Expand file tree Collapse file tree 3 files changed +48
-3
lines changed Original file line number Diff line number Diff line change 1- name : Deploy the API documentation to GitHub Pages with Dokka
1+ name : Deploy the site to GitHub Pages
22
33on :
44 push :
@@ -41,12 +41,12 @@ jobs:
4141 uses : gradle/actions/setup-gradle@v4
4242
4343 - name : Build the distribution with Gradle Wrapper
44- run : ./gradlew :dokkaGeneratePublicationHtml
44+ run : ./gradlew :generateSite
4545
4646 - name : Upload artifact
4747 uses : actions/upload-pages-artifact@v3
4848 with :
49- path : build/dokka/html /
49+ path : build/site /
5050
5151 # Deployment job
5252 deploy :
Original file line number Diff line number Diff line change 1+ import org.jetbrains.dokka.gradle.tasks.DokkaGeneratePublicationTask
2+
13tasks.wrapper {
24 distributionType = Wrapper .DistributionType .ALL
35}
@@ -14,3 +16,15 @@ dependencies {
1416 dokka(project(" :$it " ))
1517 }
1618}
19+
20+ val dokkaGeneratePublicationHtml by tasks.getting(DokkaGeneratePublicationTask ::class )
21+ tasks.register<Sync >(" generateSite" ) {
22+ group = " site"
23+
24+ val destRootDir = layout.buildDirectory.dir(" site" )
25+ into(destRootDir)
26+ from(dokkaGeneratePublicationHtml) {
27+ into(" api-documentation" )
28+ }
29+ from(layout.projectDirectory.dir(" site" ))
30+ }
Original file line number Diff line number Diff line change 1+ <!DOCTYPE html>
2+ < html lang ="en ">
3+
4+ < head >
5+ < meta content ="text/html; charset=UTF-8 " http-equiv ="Content-Type ">
6+ < meta charset ="UTF-8 ">
7+ < title > Compose HTML Material</ title >
8+ < meta content ="width=device-width, initial-scale=1 " name ="viewport ">
9+ < style >
10+ body {
11+ margin : 0 ;
12+ height : 100vh ;
13+ display : flex;
14+ justify-content : center;
15+ align-items : center;
16+ }
17+ </ style >
18+ </ head >
19+
20+ < body >
21+ < ul >
22+ < li > < a href ="api-documentation/index.html "> API documentation</ a > </ li >
23+ < li >
24+ < a href ="https://huanshankeji.github.io/compose-multiplatform-material/ ">
25+ Compose Multiplatform Material side-by-side demo
26+ </ a >
27+ </ li >
28+ </ ul >
29+ </ body >
30+
31+ </ html >
You can’t perform that action at this time.
0 commit comments