File tree Expand file tree Collapse file tree 4 files changed +8
-16
lines changed
Expand file tree Collapse file tree 4 files changed +8
-16
lines changed Original file line number Diff line number Diff line change @@ -126,7 +126,7 @@ jobs:
126126 working-directory : ./docs
127127 env :
128128 HUGO_ENV : production
129- run : hugo --minify --baseURL https://www.gooddata.com/docs/python-sdk
129+ run : hugo --minify
130130 - name : Publish (draft)
131131 uses : netlify/actions/cli@master
132132 with :
Original file line number Diff line number Diff line change @@ -42,11 +42,7 @@ if [ -n "$highest_version" ]; then
4242 echo " Promoting version $highest_version to /latest"
4343 mv -f " ./$content_dir /$highest_version " " ./$content_dir /latest"
4444
45- # Update version references in links.json
46- if [ -f " ./$content_dir /latest/links.json" ]; then
47- sed " s|${highest_version} |latest|g" " ./$content_dir /latest/links.json" > temp_links.json
48- mv temp_links.json " ./$content_dir /latest/links.json"
49- fi
45+
5046else
5147 echo " WARNING: No numbered version directory found to promote to latest"
5248fi
Original file line number Diff line number Diff line change @@ -55,11 +55,13 @@ if git cat-file -e "$API_GEN_FILE" 2>/dev/null; then
5555
5656 # Generate API introspection data from this version's SDK
5757 python3 ../scripts/docs/json_builder.py
58- mv -f data.json " $content_dir /$section /"
5958
6059 # Generate API reference markdown files
6160 python3 ../scripts/docs/python_ref_builder.py api_spec.toml \
62- " ./$content_dir /$section /data.json" " $section " " $content_dir "
61+ data.json " $section " " $content_dir "
62+
63+ # Clean up intermediate file (no longer needed after pre-rendering)
64+ rm -f data.json
6365else
6466 echo " No json_builder.py on $branch , skipping API ref generation"
6567fi
Original file line number Diff line number Diff line change @@ -104,8 +104,8 @@ for branch in "${branches_to_process[@]}" ; do
104104 rm -rf api_spec.toml
105105 fi
106106 python3 ../scripts/docs/json_builder.py
107- mv -f data.json ./versioned_docs/ " $target_section " /
108- python3 ../scripts/docs/python_ref_builder.py api_spec.toml ./versioned_docs/ " $target_section " / data.json " $target_section " versioned_docs
107+ python3 ../scripts/docs/python_ref_builder.py api_spec.toml data.json " $target_section " versioned_docs
108+ rm -f data.json
109109 fi
110110 fi
111111done
@@ -119,10 +119,4 @@ highest_version=$(ls -v1 ./versioned_docs/ | grep -E '^[0-9]+.[0-9]+$' | sort -V
119119echo " Moving ${highest_version} to /latest"
120120mv -f ./versioned_docs/$highest_version ./versioned_docs/latest
121121
122- # Replace "/${highest_version}/" with "/latest/" in links.json (if it exists)
123- if [ -f " ./versioned_docs/latest/links.json" ]; then
124- sed " s|${highest_version} |latest|g" ./versioned_docs/latest/links.json > temp.json
125- mv temp.json ./versioned_docs/latest/links.json
126- fi
127-
128122popd
You can’t perform that action at this time.
0 commit comments