This commit is contained in:
parent
16b6084d98
commit
7104a33a4b
|
@ -47,7 +47,8 @@ jobs:
|
||||||
|
|
||||||
# Process image references line by line for more reliable detection
|
# Process image references line by line for more reliable detection
|
||||||
while IFS= read -r line; do
|
while IFS= read -r line; do
|
||||||
if [[ $line =~ !\[([^]]*)\]\(([^)]+)\) ]]; then
|
# Fix the regex syntax for bash
|
||||||
|
if [[ "$line" =~ !\[(.*)\]\((.*)\) ]]; then
|
||||||
img_path="${BASH_REMATCH[2]}"
|
img_path="${BASH_REMATCH[2]}"
|
||||||
|
|
||||||
# Skip URLs
|
# Skip URLs
|
||||||
|
@ -71,18 +72,29 @@ jobs:
|
||||||
# Copy the image to wiki repository if it exists
|
# Copy the image to wiki repository if it exists
|
||||||
if [ -f "$abs_img_path" ]; then
|
if [ -f "$abs_img_path" ]; then
|
||||||
echo "Copying image: $abs_img_path -> ./wiki/$wiki_img_path"
|
echo "Copying image: $abs_img_path -> ./wiki/$wiki_img_path"
|
||||||
cp "$abs_img_path" "./wiki/$wiki_img_path"
|
cp -v "$abs_img_path" "./wiki/$wiki_img_path" || echo "Error copying image"
|
||||||
|
|
||||||
# Replace the image reference in content using a safer delimiter
|
# Escape special characters in the path for sed
|
||||||
content=$(echo "$content" | sed "s|!\\[\(.*\\)\\]($img_path)||g")
|
escaped_img_path=$(echo "$img_path" | sed 's/[\/&]/\\&/g')
|
||||||
|
|
||||||
|
# Replace the image reference in content - simpler approach with sed
|
||||||
|
content=$(echo "$content" | sed "s|!\\[.*\\]($escaped_img_path)||g")
|
||||||
echo "Replaced image reference: $img_path → $wiki_img_path"
|
echo "Replaced image reference: $img_path → $wiki_img_path"
|
||||||
else
|
else
|
||||||
echo "Warning: Image file not found: $abs_img_path"
|
echo "Warning: Image file not found: $abs_img_path"
|
||||||
|
# Add more debug info
|
||||||
|
echo "Current directory: $(pwd)"
|
||||||
|
echo "Files in $base_dir:"
|
||||||
|
ls -la "$base_dir"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
done < "./$rel_path"
|
done < "./$rel_path"
|
||||||
|
|
||||||
|
# Add debug info
|
||||||
|
echo "Wiki page content preview (first 100 chars): ${content:0:100}"
|
||||||
|
|
||||||
# Replace the wiki page with the updated content rather than appending
|
# Replace the wiki page with the updated content rather than appending
|
||||||
|
mkdir -p "$(dirname "./wiki/$wiki_page")" # Ensure directory exists
|
||||||
echo -e "# $(basename "$wiki_page" .md)\n\nContent from $rel_path:\n\n$content" > "./wiki/$wiki_page"
|
echo -e "# $(basename "$wiki_page" .md)\n\nContent from $rel_path:\n\n$content" > "./wiki/$wiki_page"
|
||||||
echo "Updated wiki page: $wiki_page"
|
echo "Updated wiki page: $wiki_page"
|
||||||
fi
|
fi
|
||||||
|
@ -91,6 +103,8 @@ jobs:
|
||||||
- name: Commit and Push to Wiki
|
- name: Commit and Push to Wiki
|
||||||
working-directory: ./wiki
|
working-directory: ./wiki
|
||||||
run: |
|
run: |
|
||||||
|
echo "Files changed in wiki repository:"
|
||||||
|
git status
|
||||||
git add .
|
git add .
|
||||||
git diff-index --quiet HEAD || git commit -m "Sync README files from main repository"
|
git diff-index --quiet HEAD || git commit -m "Sync README files from main repository"
|
||||||
git push
|
git push || { echo "Push failed, retrying with more details..."; git push --verbose; }
|
||||||
|
|
|
@ -13,7 +13,7 @@ This benchmark compares the performance of phasicFlow with a well-stablished com
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
...
|
..
|
||||||
<div align="center">
|
<div align="center">
|
||||||
<img src="./images/phasicFlow_snapshot.png" style="width: 400px;" />
|
<img src="./images/phasicFlow_snapshot.png" style="width: 400px;" />
|
||||||
<div align="center">
|
<div align="center">
|
||||||
|
|
Loading…
Reference in New Issue