This repository has been archived on 2023-02-03. You can view files and clone it, but cannot push or open issues or pull requests.
autonomic.zone/bin/deploy

28 lines
781 B
Plaintext
Raw Normal View History

2017-10-13 20:56:13 +00:00
#!/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)"
./deploy.sh -m "Hello, World!"
rm -Rfv .ssh