Skip to content

Commit 32f53dc

Browse files
committed
deploy github pages with scaladoc on release
1 parent 5791436 commit 32f53dc

File tree

3 files changed

+24
-1
lines changed

3 files changed

+24
-1
lines changed

.github/workflows/buildAndPublishPackage.yaml

+16-1
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,21 @@ jobs:
7878
with:
7979
tag_name: ${{ env.TAG_PREFIX }}${{ steps.version.outputs.new_version }}
8080
env:
81-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
81+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
82+
- name: Upload static files as artifact
83+
id: deployment
84+
uses: actions/upload-pages-artifact@v3
85+
with:
86+
path: _site/
8287

88+
deploy:
89+
environment:
90+
name: github-pages
91+
url: ${{ steps.deployment.outputs.page_url }}
92+
runs-on: ubuntu-latest
93+
needs: buildAndPublishPackage
94+
steps:
95+
- name: Deploy to GitHub Pages
96+
id: deployment
97+
uses: actions/deploy-pages@v4
8398

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,4 @@
33
.metals/
44
.vscode/
55
bundle.zip
6+
_site/

scripts/createReleaseBundle.sc

+7
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,13 @@ call(s"ls -l $bundleArchivePath").foreach(println)
100100
call(s"mv bundle.zip $bundleFilePath", cwd = tempDir).foreach(println)
101101
println(s"${GREEN}Bundle archive ready at $bundleFilePath${RESET}")
102102

103+
println(s"${GREEN}Uzipping scaladoc ...${RESET}")
104+
val siteFolderPath = os.pwd / "_site"
105+
val javadocFilePath = publishedFolder / "docs" / s"${artefactName}-javadoc.jar"
106+
os.makeDir.all(siteFolderPath)
107+
call(s"unzip $javadocFilePath -d $siteFolderPath")
108+
println(s"${GREEN}Scaladoc ready.${RESET}")
109+
103110
// ---------- UTILS ----------
104111

105112
def call(command: String, cwd: os.Path = os.pwd): Seq[String] =

0 commit comments

Comments
 (0)