blogng/.gitlab-ci.yml
Dhananjay Balan 8185eec5f1 Updated stack and moved to stack
stack setup
stack build
stack exec site build

for building the project.
2018-03-05 00:13:59 +01:00

33 lines
831 B
YAML

image: fpco/stack-build
test:
script:
- stack setup
- stack build
- stack exec site build
deploy:
before_script:
- 'which ssh-agent || ( apt-get update -y && apt-get install openssh-client -y )'
# run ssh-agent
- eval $(ssh-agent -s)
# add ssh key stored in SSH_PRIVATE_KEY variable to the agent store
- ssh-add <(echo "$SSH_PRIV_KEY")
# disable host key checking (NOTE: makes you susceptible to man-in-the-middle attacks)
# WARNING: use only in docker container, if you use it with shell you will overwrite your user's ssh config
- mkdir -p ~/.ssh
- echo -e "Host *\n\tStrictHostKeyChecking no\n\n" > ~/.ssh/config
- stack setup
script:
- stack build
- stack exec site build
- scp -r public root@dbalan.in:/usr/local/www/blog/
only:
- master