From 69a3f54e4b6debbf388c29d061634325cbca5259 Mon Sep 17 00:00:00 2001 From: Marcus Noble Date: Tue, 24 Dec 2019 12:51:06 +0000 Subject: [PATCH] Mirror to GitHub --- Jenkinsfile | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/Jenkinsfile b/Jenkinsfile index d22f5a7..0687d72 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -44,5 +44,18 @@ pipeline { } } + stage('Mirror to GitHub') { + when { branch 'master' } + environment { + GITHUB_TOKEN = credentials('Github_token') + } + steps { + sh """ + git remote add github https://${GITHUB_TOKEN}:@github.com/AverageMarcus/blog.git + git push github master + """ + } + } + } }