Tag - Hugo
You might notice something a little different if you’ve visited the site today. That’s right, a new theme based off VMware’s ClarityUI that’s in use across almost all of our products. I was envious of Cody De Arkland’s The Humble Lab blog and his work to integrate Clarity to his blog. Once I saw it, I knew that I wanted to do something similar but with my own touch and give myself a chance to dig deeper into Hugo.
As mentioned in this post I needed to download a private GitHub repo as a ZIP file. The GitHub repo containing this blog is now set to private (mainly to protect my backlog of drafts), which broke my AWS Lambda function (see here and here). Minimal changes were required from the functioning code, but there was a lot of testing. Some key changes were: Setting the GitHub Personal Access Token as a Lambda variable Modify the file download function to use custom headers Consuming the token from within Lambda to access and download the file The new function to download the repo:
Avid readers, I bring to you a nice little update to one of my more popular posts on how to deploy a Hugo website from GitHub to S3 using GitHub Webhooks, API Gateway and Lambda. Since that post, AWS has stated that they will deprecate support for Python 2.7 starting 31st December 2020. Not only that, the requests module has been removed from the AWS SDK for Python so the file downloads that happen in my Lambda function stopped working.
If you followed my previous posts on auto deploying a Hugo site from GitHub to S3 (Part 1, Part 2) you may have noticed that GitHub is deprecating the GitHub Services Integration mechanism. This is critical to the auto deployment function so we’ll need an alternative. To add to my woes, I’ve found that the Node deployment package and all of its dependencies involves more maintenance than it deserves. I also noticed that the original Node package was only adding to the target S3 bucket, not performing a sync or equivalent.
This post is part of a series. You’re reading Part 2. Auto deploy a Hugo website from GitHub to S3 - Part 1 Preparing for the AWS Lambda function Now that GitHub notifies AWS of changes, we need to create the “doing” part of our project. We’re going to use AWS’ Lambda service to perform the work. Lambda will execute the function everytime a notification is published to the SNS topic.
- Create an Azure Virtual Network Gateway IPSec VPN to PFSense
- Convert a video file to a GIF using a MacOS Automator task
- Homelab - Routing and VLANs with a PFSense VM on a single host
- How to install vRealize Operations Telegraf agent using vRealize Automation and SaltStack Config
- Change DNS server settings on a vIDM appliance