install hugo
$ brew install hugo
check the version of hugo
$ hugo version
Hugo Static Site Generator v0.38 darwin/amd64 BuildDate:
create a blog post
$ hugo new post/post001.md
create a page
$ hugo new test.md
run server
$ hugo server
$ hugo server -D (for draft)
create a public folder(build)
$ hugo
build:
rm -rf public
hugo
deploy: build
aws s3 sync public/ s3://bucket url --acl public-read --delete
aws configure set preview.cloudfront true
aws cloudfront create-invalidation --distribution-id "id" --paths '/*'
language: go
install:
- go get -v github.com/gohugoio/hugo
- pip install --user awscli
script:
- hugo version
- make deploy
branches:
only:
- master
markdown tutorial
https://www.markdowntutorial.com/