Sign inSign up

mrbits/hugo-ci

By mrbits

Updated over 7 years ago

Hugo Docker image with SSH Clients and RSync

Image
0

10K+

mrbits/hugo-ci repository overview

HUGO CI

Docker image with Hugo and SSH Clients & RSYNC to be used with gitlab-ci.

This image will deploy Hugo sites to hosts thru SSH using rsync.

SSH_KEY variable must be configured in Gitlab repository

.gitlab-ci.yml example:

image: mrbits/hugo-ci

stages:
  - deploy

before_script:
  - eval $(ssh-agent -s)
  - echo "$SSH_KEY" > /tmp/key && chmod 0400 /tmp/key && ssh-add /tmp/key
  - mkdir -p ~/.ssh
  - '[[ -f /.dockerenv ]] && echo -e "Host *\n\tStrictHostKeyChecking no\n\n" > ~/.ssh/config'

production:
  stage: deploy
  script:
    - hugo
    - rsync -vae ssh public/* user@server:/path/to/hugo/site
  only:
    - master
  environment: production

Tag summary

Content type

Image

Digest

Size

445.4 MB

Last updated

over 7 years ago

docker pull mrbits/hugo-ci