2018-03-08 18:36:28 +00:00
|
|
|
image: fpco/stack-build:lts-10.8
|
2018-03-04 21:56:07 +00:00
|
|
|
|
2018-03-08 18:46:09 +00:00
|
|
|
cache:
|
|
|
|
paths:
|
|
|
|
- _cache/
|
|
|
|
- .stack-work/
|
|
|
|
|
2018-03-04 21:56:07 +00:00
|
|
|
test:
|
|
|
|
script:
|
|
|
|
- stack setup
|
|
|
|
- stack build
|
|
|
|
- stack exec site build
|
2017-02-02 14:42:52 +00:00
|
|
|
|
2017-08-01 15:48:05 +00:00
|
|
|
deploy:
|
2017-02-02 14:42:52 +00:00
|
|
|
before_script:
|
2017-08-01 15:48:05 +00:00
|
|
|
- '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
|
|
|
|
|
2018-03-04 21:56:07 +00:00
|
|
|
- stack setup
|
2017-02-02 14:42:52 +00:00
|
|
|
script:
|
2018-03-04 21:56:07 +00:00
|
|
|
- stack build
|
|
|
|
- stack exec site build
|
2017-08-01 16:12:09 +00:00
|
|
|
- scp -r public root@dbalan.in:/usr/local/www/blog/
|
2017-02-02 14:42:52 +00:00
|
|
|
only:
|
|
|
|
- master
|
|
|
|
|
|
|
|
|