提交
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
stages:
|
||||
- deploy
|
||||
|
||||
before_script:
|
||||
- 'which ssh-agent || ( apt-get update -y && apt-get install openssh-client -y )'
|
||||
- eval $(ssh-agent -s)
|
||||
- echo "$SSH_PRIVATE_KEY" | tr -d '\r' | ssh-add -
|
||||
- mkdir -p ~/.ssh
|
||||
- chmod 700 ~/.ssh
|
||||
- '[[ -f /.dockerenv ]] && echo -e "Host *\n\tStrictHostKeyChecking no\n\n" > ~/.ssh/config'
|
||||
|
||||
deploy_job:
|
||||
stage: deploy
|
||||
script:
|
||||
- git remote remove github || true
|
||||
- git remote add github git@github.com:yun-ink/lockx.git
|
||||
- git push -u github ${CI_COMMIT_REF_NAME}
|
||||
only:
|
||||
- master
|
||||
- tags
|
||||
Reference in New Issue
Block a user