parent
d515303d8d
commit
2a8f921027
@ -0,0 +1,39 @@
|
||||
stages:
|
||||
- build
|
||||
- deploy
|
||||
|
||||
variables:
|
||||
NAME: "yova"
|
||||
EMAIL: "tech@freedomhost.de"
|
||||
GIT_SUBMODULE_STRATEGY: recursive
|
||||
HUGO_DOMAIN: wntr.org
|
||||
HUGO_BASEURL: https://$HUGO_DOMAIN/
|
||||
|
||||
build:
|
||||
image: xdevbase/hugo-builder
|
||||
stage: build
|
||||
only:
|
||||
- master
|
||||
script:
|
||||
- hugo
|
||||
artifacts:
|
||||
paths:
|
||||
- public/
|
||||
|
||||
deploy:
|
||||
image: alpine
|
||||
stage: deploy
|
||||
environment:
|
||||
name: development
|
||||
url: $HUGO_BASEURL
|
||||
only:
|
||||
- master
|
||||
before_script:
|
||||
- apk add --no-cache git openssh
|
||||
- mkdir -p ~/.ssh
|
||||
- echo "$SSH_PRIVATE_KEY" >> ~/.ssh/id_rsa
|
||||
- chmod 600 ~/.ssh/id_rsa
|
||||
- echo -e "Host *\n\tStrictHostKeyChecking no\n\n" > ~/.ssh/config
|
||||
script:
|
||||
- cd public
|
||||
- rsync -rz -e 'ssh -p 1006' . gh0st@135.125.132.92:/var/www/$HUGO_DOMAIN
|
Loading…
Reference in new issue