1
0
mirror of https://gitlab.com/Anson-Projects/projects.git synced 2025-09-14 09:35:04 +00:00
Files
Projects/ghost-upload/.gitlab-ci.yml
Anson 0675f1f1b7 Fix CI dependency issues with needs:optional
- Make pages job dependency optional for ghost-upload jobs
- Prevents 'job does not exist in pipeline' errors
- Allows jobs to run even if pages job is conditionally excluded
2025-08-21 23:35:36 -06:00

40 lines
862 B
YAML

cache:
paths:
- ./ghost-upload/target/
- ./ghost-upload/cargo/
publish:
stage: deploy
image: rust:latest
script:
- cd ./ghost-upload
- cargo run
needs:
- job: pages
optional: true
# Temporarily allow all branches for debugging
# rules:
# - if: "$CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH"
# Manual trigger to force update all Ghost posts
force-update-ghost:
stage: deploy
image: rust:latest
script:
- echo "🔄 Force updating all Ghost posts..."
- cd ./ghost-upload
- FORCE_UPDATE=true cargo run
needs:
- job: pages
optional: true
# Temporarily allow all branches for debugging
rules:
- when: manual
allow_failure: false
# rules:
# - if: "$CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH"
# when: manual
# allow_failure: false
variables:
FORCE_UPDATE: "true"