From b1b798b5857ecc8a67436aa9d85a325f4ad07271 Mon Sep 17 00:00:00 2001 From: Ivan Grokhotkov Date: Fri, 23 Sep 2016 12:04:38 +0800 Subject: [PATCH] Deploy to GitHub automatically --- .gitlab-ci.yml | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 .gitlab-ci.yml diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 0000000..911ac8e --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,20 @@ +stages: + - deploy + +push_master_to_github: + stage: deploy + only: + - master +# when: on_success + image: espressif/esp32-ci-env + variables: + GIT_STRATEGY: clone + script: + - mkdir -p ~/.ssh + - chmod 700 ~/.ssh + - echo -n $GH_PUSH_KEY > ~/.ssh/id_rsa_base64 + - base64 --decode --ignore-garbage ~/.ssh/id_rsa_base64 > ~/.ssh/id_rsa + - chmod 600 ~/.ssh/id_rsa + - echo -e "Host github.com\n\tStrictHostKeyChecking no\n" >> ~/.ssh/config + - git remote add github git@github.com:espressif/esp32-bt-lib.git + - git push github HEAD:master