mirror of
https://gitlab.com/Anson-Projects/projects.git
synced 2025-09-14 09:35:04 +00:00
- 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
39 lines
1.1 KiB
Markdown
39 lines
1.1 KiB
Markdown
# ghost-upload
|
|
|
|
This tool synchronizes posts from https://projects.ansonbiggs.com to the Ghost blog at https://notes.ansonbiggs.com.
|
|
|
|
## Features
|
|
|
|
- **Automatic sync**: Only uploads new posts by default
|
|
- **Content extraction**: Fetches clean HTML content instead of using iframes
|
|
- **AI summaries**: Uses Kagi Summarizer for post summaries
|
|
- **Force update**: Manual trigger to update all existing posts
|
|
|
|
## Usage
|
|
|
|
### Normal Mode (Default)
|
|
```bash
|
|
cargo run
|
|
```
|
|
Only processes new posts that don't exist on the Ghost blog.
|
|
|
|
### Force Update Mode
|
|
```bash
|
|
FORCE_UPDATE=true cargo run
|
|
```
|
|
Updates ALL posts, including existing ones. Useful for:
|
|
- Updating content after changes
|
|
- Refreshing summaries
|
|
- Applying new styling/formatting
|
|
|
|
## CI/CD Integration
|
|
|
|
The GitLab CI pipeline includes:
|
|
- **Automatic sync**: Runs after each deployment
|
|
- **Manual force update**: Available as a manual trigger in GitLab UI
|
|
|
|
## Environment Variables
|
|
|
|
- `admin_api_key`: Ghost Admin API key (required)
|
|
- `kagi_api_key`: Kagi Summarizer API key (required)
|
|
- `FORCE_UPDATE`: Set to "true" to update all posts (optional) |