Skip to content
master
Switch branches/tags
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 

docker-hugo


Use this image to build your Hugo website as a docker image.

I use this image as my build container on gitlab.com with their built-in CI system.

Sample .gitlab-ci.yml

This is the CI configuration I use to build my Hugo based website. I sync the contents to an Amazon Web Services S3 bucket. Then I've setup Cloudfront to handle SSL in front of the bucket.

image: mapitman/docker-hugo:latest
stages:
  - build
  - deploy
variables:
  GIT_SUBMODULE_STRATEGY: recursive
build:
  stage: build
  script:
  - hugo
  artifacts:
    paths:
    - public

deploy:
  stage: deploy
  script:
  - aws s3 sync ./public/ s3://$AWS_S3_BUCKET/ --acl public-read --delete
  - aws cloudfront create-invalidation --distribution-id $AWS_DIST_ID  --paths "/*"
  only:
  - master

About

Docker image to build hugo websites

Resources

License

Packages

No packages published