Commit 5fe1e92f authored by yova's avatar yova 💫

initial

parent f981d9d5
Pipeline #233 failed with stages
in 39 seconds
stages:
- build
- deploy
- build-prod
- deploy-prod
variables:
NAME: "anonymous"
EMAIL: "status@ecobytes.net"
build-dev:
image: jguyomard/hugo-builder
stage: build
only:
- master
variables:
GIT_SUBMODULE_STRATEGY: recursive
HUGO_BASEURL: http://$APP_NAME_DEV.dokku.ecobytes.net/
script:
- hugo
artifacts:
paths:
- public/
deploy-dev:
image: alpine
stage: deploy
environment:
name: development
url: http://$APP_NAME_DEV.dokku.ecobytes.net/
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
- git init
- git add -A .
- git commit -m runner
- git remote add dokku dokku@dokku.ecobytes.net:$APP_NAME_DEV
- git push -vv dokku +master
build-prod:
image: jguyomard/hugo-builder
stage: build-prod
when: manual
allow_failure: false
only:
- master
variables:
GIT_SUBMODULE_STRATEGY: recursive
script:
- hugo -b https://$APP_NAME/
dependencies: []
artifacts:
paths:
- public/
deploy-prod:
image: alpine
stage: deploy-prod
environment:
name: production
url: $APP_NAME
only:
- master
dependencies:
- build-prod
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
- git init
- git add -A .
- git commit -m runner
- git remote add dokku dokku@dokku.ecobytes.net:$APP_NAME
- git push -vv dokku +master
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment