diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index b9a76a1cb4973492f07c7789b1481f5ec258237f..bb9310c78baaeca1d3fbcd611b4f1f223fdb512f 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -103,3 +103,15 @@ pages: when: manual # Run only when triggered manually - if: '$CI_PIPELINE_SOURCE == "trigger"' # Triggered by another pipeline when: on_success # Run if the source pipeline was successful +# Deploy to GitLab Pages +deploy_gitlab_pages: + stage: .post + script: + - mv $CI_PROJECT_DIR/public $CI_PROJECT_DIR/public # Ensure the output is in the public folder + rules: + - if: '$CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH' # Run when the commit is on the default branch + when: on_success # Only run if the previous jobs are successful + - if: '$CI_COMMIT_BRANCH != $CI_DEFAULT_BRANCH' # Allow manual triggers on non-default branches + when: manual # Run only when triggered manually + - if: '$CI_PIPELINE_SOURCE == "trigger"' # Triggered by another pipeline + when: on_success # Run if the source pipeline was successful \ No newline at end of file