Setting up a Quarto website with Netlify and Github Actions

website
Author

Anil Radhakrishnan

Published

January 5, 2023

Intro

Configuring urls for websites is a hassle and I forget how to do so everytime I need to do it. Maybe if I write it down, I’ll remember it next time.

Deployment

Thanks to quarto, creating local static websites has become a breeze. Since I have been using quarto for basically everything I can recently, I made my personal website through it as well.

Now I want to be able to deploy it onto my google domains url and have it automatically update when I push to github. I am using github actions alongside netlify to do this.

Using Github actions to do this means that I can have a single source of truth for my website and not have to worry about manually updating it. I can just push to github and it will automatically update. And with the editing UI, I don’t even need to clone the repo for minor changes like yaml file updates.

Both the structure of this repo and the github actions workflow are heavily inspired by this repo by David Dimmery.

DNS

netlify makes it very convienent to set up a custom domain. No messing around with CNAMES or anything. Just point the custom dns server to netlify and it will automatically set up the rest. The netlify dns servers are:

dns1.p06.nsone.net
dns2.p06.nsone.net
dns3.p06.nsone.net
dns4.p06.nsone.net

Problem: google domain emails

Using netlify’s custom dns will stop any email forwarding you want set up in google domains. To get back the email forwarding functionality, you need to add the relevant MX records to netlify. The records are given here and are as follows:

Name/Host/Alias Type Time-to-live (TTL) (seconds) Priority Value/Answer/Destination
Blank or @ MX 3600 5 gmr-smtp-in.l.google.com
Blank or @ MX 3600 10 alt1.gmr-smtp-in.l.google.com
Blank or @ MX 3600 20 alt2.gmr-smtp-in.l.google.com
Blank or @ MX 3600 30 alt3.gmr-smtp-in.l.google.com
Blank or @ MX 3600 40 alt4.gmr-smtp-in.l.google.com

To add these records, click on site -> domain settings -> Netlify DNS -> add new record.

Once you have completelted this, your email forwarding should work as though the site was hosted on google domains.