File tree Expand file tree Collapse file tree 3 files changed +23
-6
lines changed
src/main/kotlin/org/pkl/package_docs Expand file tree Collapse file tree 3 files changed +23
-6
lines changed Original file line number Diff line number Diff line change @@ -100,6 +100,13 @@ local publishJob: Workflow.Job = new {
100100 cache = "gradle"
101101 }
102102 }
103+ // check out again to write credentials to workspace (needed by publish task).
104+ new Common .Checkout {
105+ with {
106+ `fetch-depth` = 0
107+ `persist-credentials` = true
108+ }
109+ }
103110 new {
104111 env {
105112 ["GH_TOKEN" ] = Context.github.token
Original file line number Diff line number Diff line change 3939 java-version : ' 21'
4040 distribution : temurin
4141 cache : gradle
42+ - uses : actions/checkout@v5
43+ with :
44+ persist-credentials : true
45+ fetch-depth : 0
4246 - name : Generate and publish docs
4347 env :
4448 GH_TOKEN : ${{ github.token }}
Original file line number Diff line number Diff line change @@ -26,13 +26,19 @@ fun main(args: Array<String>) {
2626 val (owner, repo) = repoStr.split(" /" )
2727 Repo (owner, repo)
2828 }
29- val docsGenerator = PackageDocs (gitRootDir, outputDir, repos)
30- docsGenerator.generateDocs()
31- if (doPublish) {
32- docsGenerator.uploadDocs()
33- }
29+ try {
30+ val docsGenerator = PackageDocs (gitRootDir, outputDir, repos)
31+ docsGenerator.generateDocs()
32+ if (doPublish) {
33+ docsGenerator.uploadDocs()
34+ }
3435 // hotfix: call `exitProcess` here to workaround something
3536 // causing the docs generator to hang.
3637 // TODO: figure out why this is hanging.
37- exitProcess(0 )
38+ } catch (e: Throwable ) {
39+ System .err.println (e.stackTraceToString())
40+ exitProcess(1 )
41+ } finally {
42+ exitProcess(0 )
43+ }
3844}
You can’t perform that action at this time.
0 commit comments