Skip to content

Commit 63bc9cf

Browse files
authored
Fix api docs upload (#8024)
* remove deprecated getExn * fix API docs upload download-artifacts v5 changed download path https://github.com/actions/download-artifact?tab=readme-ov-file#v5---whats-new
1 parent fa64b08 commit 63bc9cf

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -515,7 +515,7 @@ jobs:
515515
uses: actions/download-artifact@v6
516516
with:
517517
artifact-ids: ${{ needs.build-compiler.outputs.api-docs-artifact-id }}
518-
path: data
518+
path: data/api
519519

520520
- name: Check if repo is clean
521521
id: diffcheck

scripts/res/GenApiDocs.res

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ let version = switch Fs.readFileSync(packagePath, ~encoding="utf8")->JSON.parseO
1515
| Object(dict{"version": JSON.String(version)}) => version
1616
| _ => JsError.panic("Invalid package.json format")
1717
}
18-
let version = Semver.parse(version)->Option.getExn
18+
let version = Semver.parse(version)->Option.getOrThrow
1919
let version = Semver.toString({...version, preRelease: None}) // Remove pre-release identifiers for API docs
2020
let dirVersion = Path.join([Node.dirname, "apiDocs", version])
2121
if !Fs.existsSync(dirVersion) {
@@ -257,7 +257,7 @@ let () = {
257257
tocTree
258258
->Dict.fromArray
259259
->JSON.stringifyAny
260-
->Option.getExn,
260+
->Option.getOrThrow,
261261
)
262262
Console.log("Generated toc_tree.json")
263263
Console.log(`API docs generated successfully in ${dirVersion}`)

0 commit comments

Comments
 (0)