Skip to content

Commit 050e896

Browse files
committed
update coref api builder process in ci
1 parent 3ce08b0 commit 050e896

File tree

2 files changed

+17
-9
lines changed

2 files changed

+17
-9
lines changed

.github/workflows/pages.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ name: Deploy Jekyll site to Pages
88

99
on:
1010
push:
11-
branches: ["main", "doc-preview"]
11+
branches: ["main", "doc-preview", "coref-api"]
1212
paths:
1313
- "doc/**"
1414

@@ -43,6 +43,8 @@ jobs:
4343
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
4444
cache-version: 0 # Increment this number if you need to re-download cached gems
4545
working-directory: '${{ github.workspace }}/doc'
46+
- name: Generate COREF API Documents
47+
run: python3 tools/build.py
4648
- name: Setup Pages
4749
id: pages
4850
uses: actions/configure-pages@v3

doc/tools/build.py

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,21 @@
11
import subprocess
2-
import sys
3-
4-
if len(sys.argv) != 2:
5-
print("Usage: python this_file.py godel_script_executable_path")
6-
exit(-1)
7-
8-
godel_script_executable = sys.argv[1]
92

3+
print("Download Sparrow CLI")
4+
subprocess.run([
5+
"curl",
6+
"-L",
7+
"https://github.com/codefuse-ai/CodeFuse-Query/releases/download/2.0.2/sparrow-cli-2.0.2.linux.tar.gz",
8+
"-o",
9+
"sparrow-cli.tar.gz"
10+
])
11+
subprocess.run([
12+
"tar",
13+
"-xvzf",
14+
"sparrow-cli-2.0.2.linux.tar.gz"
15+
])
1016
print("Copy ../assets into ./doc/assets")
1117
subprocess.run(["cp", "-r", "../assets", "./"])
1218
print("Concat coref library from ../language into ./.coref-api-build")
1319
subprocess.run(["python3", "tools/generate_coref_library.py", "../language"])
1420
print("Generate markdown documents into ./godel-api")
15-
subprocess.run(["python3", "tools/generate_markdown.py", godel_script_executable])
21+
subprocess.run(["python3", "tools/generate_markdown.py", "./sparrow-cli/godel-script/usr/bin/godel"])

0 commit comments

Comments
 (0)