30 lines
667 B
YAML
30 lines
667 B
YAML
image: lab.wtfteam.pro:4567/containers/hugo:latest
|
|
|
|
variables:
|
|
GIT_SUBMODULE_STRATEGY: recursive
|
|
|
|
build site:
|
|
stage: build
|
|
script:
|
|
- hugo -d tango.hodakov.me
|
|
artifacts:
|
|
untracked: true
|
|
expire_in: 4 hours
|
|
paths:
|
|
- tango.hodakov.me
|
|
|
|
deploy site:
|
|
stage: deploy
|
|
only:
|
|
- master
|
|
before_script:
|
|
- apk add --no-cache openssh-client
|
|
- mkdir -p ~/.ssh
|
|
- echo "$DEPLOY_KEY" | tr -d '\r' > ~/.ssh/id_rsa
|
|
- chmod 600 ~/.ssh/id_rsa
|
|
- eval "$(ssh-agent -s)"
|
|
- ssh-add ~/.ssh/id_rsa
|
|
- ssh-keyscan -H $DEPLOY_HOST >> ~/.ssh/known_hosts
|
|
script:
|
|
- scp -r tango.hodakov.me $DEPLOY_USER@$DEPLOY_HOST:$DEPLOY_PATH
|