Commit 551a21ed authored by Cool Fire (HN)'s avatar Cool Fire (HN)

Test alternate build strategy

parent b618f22d
Pipeline #1464 passed with stages
in 5 minutes and 17 seconds
......@@ -2,48 +2,54 @@
before_script:
- apt-get update
- apt-get install -y -qq openssh-client rsync wget
- wget https://github.com/gohugoio/hugo/releases/download/v0.54.0/hugo_0.54.0_Linux-64bit.deb
- dpkg -i hugo_0.54.0_Linux-64bit.deb
- eval $(ssh-agent -s)
- ssh-add <(echo "$SSH_PRIVATE_KEY")
- mkdir -p ~/.ssh
- echo -e "Host *\n\tStrictHostKeyChecking no\n\n" > ~/.ssh/config
stages:
- build
- deploy
variables:
GIT_SUBMODULE_STRATEGY: recursive
build:
stage: build
image: ubuntu:18.04
script:
- wget https://github.com/gohugoio/hugo/releases/download/v0.54.0/hugo_0.54.0_Linux-64bit.deb
- dpkg -i hugo_0.54.0_Linux-64bit.deb
- hugo -v --gc
artifacts:
paths:
- public/
expire_in: 1 week
deploy_staging:
stage: deploy
dependencies:
- build
image: ubuntu:18.04
script:
- hugo -v --gc
- rsync --sparse --delete --no-motd -a -q public/* i2am@10.0.1.105:~/public_html/i2am.insomnia247.nl/
environment:
name: staging
url: http://i2am.insomnia247.nl
only:
- master
artifacts:
paths:
- public/
expire_in: 1 week
- master
deploy_prod:
stage: deploy
dependencies:
- build
image: ubuntu:18.04
script:
- hugo -v --gc
- rsync --sparse --delete --no-motd -a -q public/* i2am@10.0.1.105:~/public_html/i2.am/
environment:
name: production
url: http://i2.am
when: manual
only:
- master
artifacts:
paths:
- public/
expire_in: 1 week
- 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