mirror of
https://gitlab.com/Anson-Projects/projects.git
synced 2025-09-14 09:35:04 +00:00
Fix GitLab Pages special behavior
- Rename main deployment job to 'deploy' (runs on all branches) - Keep 'pages' job for GitLab Pages (only runs on main branch) - Ghost-upload jobs now depend on 'deploy' instead of 'pages' - Fixes pipeline creation issues on feature branches
This commit is contained in:
@@ -22,7 +22,7 @@ staging:
|
|||||||
paths:
|
paths:
|
||||||
- public
|
- public
|
||||||
|
|
||||||
pages:
|
deploy:
|
||||||
stage: deploy
|
stage: deploy
|
||||||
script:
|
script:
|
||||||
- echo "Publishing site..."
|
- echo "Publishing site..."
|
||||||
@@ -32,5 +32,18 @@ pages:
|
|||||||
paths:
|
paths:
|
||||||
- public
|
- public
|
||||||
|
|
||||||
|
# GitLab Pages deployment (only on main branch)
|
||||||
|
pages:
|
||||||
|
stage: deploy
|
||||||
|
script:
|
||||||
|
- echo "Publishing to GitLab Pages..."
|
||||||
|
needs:
|
||||||
|
- deploy
|
||||||
|
artifacts:
|
||||||
|
paths:
|
||||||
|
- public
|
||||||
|
rules:
|
||||||
|
- if: "$CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH"
|
||||||
|
|
||||||
include:
|
include:
|
||||||
- local: ghost-upload/.gitlab-ci.yml
|
- local: ghost-upload/.gitlab-ci.yml
|
||||||
|
@@ -10,7 +10,7 @@ publish:
|
|||||||
- cd ./ghost-upload
|
- cd ./ghost-upload
|
||||||
- cargo run
|
- cargo run
|
||||||
needs:
|
needs:
|
||||||
- pages
|
- deploy
|
||||||
|
|
||||||
# Manual trigger to force update all Ghost posts
|
# Manual trigger to force update all Ghost posts
|
||||||
force-update-ghost:
|
force-update-ghost:
|
||||||
@@ -21,7 +21,7 @@ force-update-ghost:
|
|||||||
- cd ./ghost-upload
|
- cd ./ghost-upload
|
||||||
- FORCE_UPDATE=true cargo run
|
- FORCE_UPDATE=true cargo run
|
||||||
needs:
|
needs:
|
||||||
- pages
|
- deploy
|
||||||
rules:
|
rules:
|
||||||
- when: manual
|
- when: manual
|
||||||
allow_failure: false
|
allow_failure: false
|
||||||
|
Reference in New Issue
Block a user