https://github.com/mapitman/docker-hugo
Docker image to build hugo websites
https://github.com/mapitman/docker-hugo
Last synced: 4 months ago
JSON representation
Docker image to build hugo websites
- Host: GitHub
- URL: https://github.com/mapitman/docker-hugo
- Owner: mapitman
- License: mit
- Created: 2016-09-24T22:46:27.000Z (over 9 years ago)
- Default Branch: main
- Last Pushed: 2023-09-22T05:43:09.000Z (almost 3 years ago)
- Last Synced: 2026-02-11T00:39:15.671Z (4 months ago)
- Language: Dockerfile
- Homepage:
- Size: 6.84 KB
- Stars: 3
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# docker-hugo
Use this image to build your [Hugo](https://gohugo.io/) website as a docker image.
I use this image as my build container on [gitlab.com](https://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.
```sh
image: mapitman/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
```