From 79db8d6498382ca147bd6d2d41fba4340839de34 Mon Sep 17 00:00:00 2001 From: Azza Ahmed <a.e.ahmed@tudelft.nl> Date: Wed, 7 May 2025 22:52:11 +0200 Subject: [PATCH] auto mirror to github repo --- .gitlab-ci.yml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 69b3512..8aecc3c 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -46,3 +46,20 @@ pages: # Compress # https://docs.gitlab.com/ee/user/project/pages/introduction.html#serving-compressed-assets # https://blog.ideotec.es/support-compression-gitlab-pages/ + +# --------------------------------------------------- +# 🚀 Mirror changes to GitHub (only from default branch) +# --------------------------------------------------- +mirror_to_github: + image: alpine:latest + stage: deploy + script: + - apk add --no-cache git + - 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 -- GitLab