1
0
mirror of https://gitlab.com/Anson-Projects/projects.git synced 2025-09-14 09:35:04 +00:00

Add force update functionality for Ghost posts

- Add manual CI trigger 'force-update-ghost' for updating all posts
- Support FORCE_UPDATE environment variable in Rust code
- Implement post update logic via Ghost API PUT requests
- Add get_existing_post_id() function to find existing posts
- Update README with usage instructions
- Enhanced validation script to test new functionality

Usage:
- Normal: Only syncs new posts (default behavior)
- Force: FORCE_UPDATE=true updates ALL posts including existing ones
This commit is contained in:
2025-08-21 23:30:29 -06:00
parent 05474b986d
commit 9fc6a9bae1
4 changed files with 170 additions and 20 deletions

View File

@@ -49,6 +49,22 @@ else
exit 1
fi
# Check if force update functionality is available
if grep -q "FORCE_UPDATE" ghost-upload/src/main.rs; then
echo "✅ Force update functionality found"
else
echo "❌ Force update functionality not found"
exit 1
fi
# Check if manual CI job is configured
if grep -q "force-update-ghost" ghost-upload/.gitlab-ci.yml; then
echo "✅ Manual force update CI job found"
else
echo "❌ Manual force update CI job not found"
exit 1
fi
# Verify Rust code compiles
echo "🛠️ Building Rust code..."
cd ghost-upload
@@ -67,5 +83,7 @@ echo " • Quarto profiles for dual-output rendering"
echo " • Ghost-optimized CSS styling"
echo " • GitLab CI builds both main site and ghost-content"
echo " • Rust extracts HTML content instead of using iframes"
echo " • Force update mode to refresh existing posts"
echo " • Manual CI trigger for content updates"
echo ""
echo "🚀 Ready for testing in CI/CD pipeline!"