Skip to content
This repository was archived by the owner on Mar 19, 2025. It is now read-only.

wnka/hugo-lambda

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 

Repository files navigation

Huh?

This Go code is meant to be run in AWS Lambda and is what I use to update my blog, the source of which is stored on GitHub and hosted in S3 and CloudFront.

How

  1. Download the 64-bit Linux version of hugo from here: https://github.com/gohugoio/hugo/releases
  2. Put the hugo binary in the same directory as this repository
  3. Create the AWS Lambda bundle: GOOS=linux go build main.go && zip main.zip main hugo
  4. This will create main.zip which is your Lambda function.

When you create you Lambda function, pick a decent function timeout and memory usage. I use a 1 Minute timeout and 512MB function memory and it works for me. YYMV.

Environment variables to set

Env Var Description example
GIT_REPO The URL for the Git repository that hosts your Hugo blog https://github.com/wnka/pdp80-blog.git
S3_BUCKET The S3 bucket that hosts your blog pdp80.com
S3_REGION The AWS region your S3 bucket lives in us-east-1

About

AWS Lambda function for updating a Hugo blog hosted in S3/CloudFront

Resources

Stars

4 stars

Watchers

1 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages