Merge branch 'master' of gitlab.com:autonomic-cooperative/autonomic-cooperative.gitlab.io
This commit is contained in:
commit
c23bf3f8d9
@ -1,28 +1,17 @@
|
|||||||
image: ruby:2.4.2
|
image: ruby:2.4.2
|
||||||
|
|
||||||
stages:
|
stages:
|
||||||
- build
|
|
||||||
- deploy
|
- deploy
|
||||||
|
|
||||||
build:
|
|
||||||
stage: build
|
|
||||||
before_script:
|
|
||||||
- gem install jekyll
|
|
||||||
script:
|
|
||||||
- jekyll build -d public
|
|
||||||
artifacts:
|
|
||||||
paths:
|
|
||||||
- public
|
|
||||||
|
|
||||||
deploy:
|
deploy:
|
||||||
stage: deploy
|
stage: deploy
|
||||||
before_script:
|
before_script:
|
||||||
- gem install jekyll
|
- gem install jekyll
|
||||||
script:
|
script:
|
||||||
- jekyll build -d public
|
- jekyll build -d public
|
||||||
- ./bin/deploy
|
- rsync -avz --delete --no-group ./dist/ $SERVER_USER@autonomic.zone:/var/www/autonomic.zone/html/
|
||||||
artifacts:
|
artifacts:
|
||||||
paths:
|
paths:
|
||||||
- public
|
- public
|
||||||
only:
|
only:
|
||||||
- tags
|
- master
|
||||||
|
26
bin/deploy
26
bin/deploy
@ -1,26 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
GITUSERNAME="autonomicgitlabci"
|
|
||||||
GITUSEREMAIL="autonomicgitlabci@nowhere.com"
|
|
||||||
DEPLOYSCRIPT="https://github.com/X1011/git-directory-deploy/raw/master/deploy.sh"
|
|
||||||
|
|
||||||
export GIT_DEPLOY_DIR="public"
|
|
||||||
export GIT_DEPLOY_BRANCH="production"
|
|
||||||
export GIT_DEPLOY_REPO="git@gitlab.com:autonomic-cooperative/autonomic-cooperative.gitlab.io.git"
|
|
||||||
|
|
||||||
apt-get update -y
|
|
||||||
apt-get install -yqq wget openssh-client
|
|
||||||
|
|
||||||
wget $DEPLOYSCRIPT && chmod +x deploy.sh
|
|
||||||
|
|
||||||
git config --global user.email $GITUSEREMAIL
|
|
||||||
git config --global user.name $GITUSERNAME
|
|
||||||
|
|
||||||
mkdir -p ~/.ssh
|
|
||||||
eval "$(ssh-agent -s)"
|
|
||||||
ssh-add <(echo "$SSH_PRIVATE_KEY")
|
|
||||||
echo -e "Host *\n\tStrictHostKeyChecking no\n\n" > ~/.ssh/config
|
|
||||||
|
|
||||||
./deploy.sh -m "Git tag: $(git describe --exact-match HEAD)"
|
|
||||||
|
|
||||||
rm -Rfv .ssh
|
|
Reference in New Issue
Block a user