Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/netlify-deploy-v2.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ jobs:
working-directory: ./docs
env:
HUGO_ENV: production
run: hugo --minify --baseURL https://www.gooddata.com/docs/python-sdk
run: hugo --minify
- name: Publish (draft)
uses: netlify/actions/cli@master
with:
Expand Down
6 changes: 1 addition & 5 deletions scripts/assemble-versions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,7 @@ if [ -n "$highest_version" ]; then
echo "Promoting version $highest_version to /latest"
mv -f "./$content_dir/$highest_version" "./$content_dir/latest"

# Update version references in links.json
if [ -f "./$content_dir/latest/links.json" ]; then
sed "s|${highest_version}|latest|g" "./$content_dir/latest/links.json" > temp_links.json
mv temp_links.json "./$content_dir/latest/links.json"
fi

else
echo "WARNING: No numbered version directory found to promote to latest"
fi
Expand Down
6 changes: 4 additions & 2 deletions scripts/generate-single-version.sh
Original file line number Diff line number Diff line change
Expand Up @@ -55,11 +55,13 @@ if git cat-file -e "$API_GEN_FILE" 2>/dev/null; then

# Generate API introspection data from this version's SDK
python3 ../scripts/docs/json_builder.py
mv -f data.json "$content_dir/$section/"

# Generate API reference markdown files
python3 ../scripts/docs/python_ref_builder.py api_spec.toml \
"./$content_dir/$section/data.json" "$section" "$content_dir"
data.json "$section" "$content_dir"

# Clean up intermediate file (no longer needed after pre-rendering)
rm -f data.json
else
echo "No json_builder.py on $branch, skipping API ref generation"
fi
Expand Down
10 changes: 2 additions & 8 deletions scripts/generate.sh
Original file line number Diff line number Diff line change
Expand Up @@ -104,8 +104,8 @@ for branch in "${branches_to_process[@]}" ; do
rm -rf api_spec.toml
fi
python3 ../scripts/docs/json_builder.py
mv -f data.json ./versioned_docs/"$target_section"/
python3 ../scripts/docs/python_ref_builder.py api_spec.toml ./versioned_docs/"$target_section"/data.json "$target_section" versioned_docs
python3 ../scripts/docs/python_ref_builder.py api_spec.toml data.json "$target_section" versioned_docs
rm -f data.json
fi
fi
done
Expand All @@ -119,10 +119,4 @@ highest_version=$(ls -v1 ./versioned_docs/ | grep -E '^[0-9]+.[0-9]+$' | sort -V
echo "Moving ${highest_version} to /latest"
mv -f ./versioned_docs/$highest_version ./versioned_docs/latest

# Replace "/${highest_version}/" with "/latest/" in links.json (if it exists)
if [ -f "./versioned_docs/latest/links.json" ]; then
sed "s|${highest_version}|latest|g" ./versioned_docs/latest/links.json > temp.json
mv temp.json ./versioned_docs/latest/links.json
fi

popd
Loading