Skip to content

Instantly share code, notes, and snippets.

@ritesh
Created January 3, 2017 15:41
Show Gist options
  • Save ritesh/8665b5bad6de7fec1147c13ba636b624 to your computer and use it in GitHub Desktop.
Save ritesh/8665b5bad6de7fec1147c13ba636b624 to your computer and use it in GitHub Desktop.
Build site from AWS code commit
version: 0.1
phases:
install:
commands:
- echo Installing wget and downloading hugo to tmp
- apt-get install -y wget zip
- wget https://github.com/spf13/hugo/releases/download/v0.17/hugo_0.17_Linux-64bit.tar.gz && tar xzvf hugo_0.17_Linux-64bit.tar.gz -C /tmp/
- chmod +x /tmp/hugo_0.17_linux_amd64/hugo_0.17_linux_amd64
pre_build:
commands:
- echo Nothing to do for pre-build
build:
commands:
- echo Build started on `date`
- /tmp/hugo_0.17_linux_amd64/hugo_0.17_linux_amd64
post_build:
commands:
- echo Build completed on `date`. Waiting for files to be pushed to S3
- aws s3 sync public/. s3://<WHATEVER YOUR S3 BUCKET IS CALLED>/ --delete
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment