stages:
  - mirror


mirror repository:
    stage: mirror
    allow_failure: true
    variables:
      REPO: "git@github.com:RafalSkolasinski/devenv.git"
    before_script:
      - mkdir ~/.ssh && chmod 700 ~/.ssh
      - ssh-keyscan github.com >> ~/.ssh/known_hosts
      - echo "$DEPLOY_KEY" > ~/.ssh/id_rsa && chmod 600 ~/.ssh/id_rsa
    after_script:
      - rm -rf ~/.ssh
    script:
      - ORIGIN_URL=$(git config --get remote.origin.url)
      - cd $(mktemp -d); git clone --bare $ORIGIN_URL .
      - git push --mirror $REPO

stages:
  - mirror


mirror repository:
    stage: mirror
    allow_failure: true
    variables:
      REPO: "git@github.com:RafalSkolasinski/kwant-devenv.git"
    before_script:
      - mkdir ~/.ssh && chmod 700 ~/.ssh
      - ssh-keyscan github.com >> ~/.ssh/known_hosts
      - echo "$DEPLOY_KEY" > ~/.ssh/id_rsa && chmod 600 ~/.ssh/id_rsa
    after_script:
      - rm -rf ~/.ssh
    script:
      - ORIGIN_URL=$(git config --get remote.origin.url)
      - cd $(mktemp -d); git clone --bare $ORIGIN_URL .
      - git push --mirror $REPO

Update path to github repo
Update path to github repo