From ea820b65f5d3d12c15a9606592c8ff0dc0cfd957 Mon Sep 17 00:00:00 2001 From: Azza Ahmed <a.e.ahmed@tudelft.nl> Date: Wed, 7 May 2025 23:02:30 +0200 Subject: [PATCH] update github mirroring --- .gitlab-ci.yml | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 8aecc3c..2df7903 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -48,18 +48,17 @@ pages: # https://blog.ideotec.es/support-compression-gitlab-pages/ # --------------------------------------------------- -# 🚀 Mirror changes to GitHub (only from default branch) +# Mirror changes to GitHub (only from default branch) # --------------------------------------------------- mirror_to_github: image: alpine:latest stage: deploy - script: + before_script: - apk add --no-cache git + script: - git config --global user.name "GitLab Mirror Bot" - git config --global user.email "mirror-bot@daic.tudelft.nl" - - git clone --mirror https://gitlab.ewi.tudelft.nl/daic/docs.git - - cd docs.git - git remote add github https://$GITHUB_TOKEN@github.com/daic-tud/docs.git - git push github --mirror - only: - - $CI_DEFAULT_BRANCH \ No newline at end of file + rules: + - if: $CI_COMMIT_REF_NAME == $CI_DEFAULT_BRANCH \ No newline at end of file -- GitLab