How to schedule posts with static site generators

Most static site hosts like Netlify or GitHub Pages do not have a simple built-in way of scheduling when posts are published, you can either setup a GitHub Action to trigger a rebuild of the site or, more simply, you can use an external service to trigger it for you. GitArborist makes it quite simple to schedule posts without needing to leave GitHub by using a Pull Request.

Example Setup

This example assumes the following:

  1. You have a GitHub repository containing your static site
    (any framework Hugo/Hexo/Gatsby/Jekyll/Bridgetown/etc).
  2. You are hosting the site with Netlify and have it configured to automatically deploy (if not you can use the Netlify documentation on deploys to get set up)
  3. You have installed GitArborist into the repository which containts the static site

Post Scheduling Workflow

It's Thursday night. After an unusually productive 'bout of screen time you've knocked out that article you've been dreading, run it through Grammarly to nitpick your idiosyncrasies, and it's ready to go. It's due to be published Monday morning.

Step 1: Push the post up to GitHub on a new branch

> git checkout -b post/my-awesome-post
> git add content/posts/my-awesome-post.md
> git commit -m "Awesomesauce"
> git push -u origin post/my-awesome-post

Step 2: Open a Pull Request from that branch to your main branch

You like to give an appearance of being organized so you put the scheduled date in the title, this makes it easy to see how far ahead you are with your content:

Screenshot of GitHub Pull Request creation form

Step 3: Tell GitArborist when to merge in the description

@gitarborist merge at 9:00 Monday

Luckly you've already told GitArborist your timezone in an earlier Pull Request:

@gitarborist set my timezone to America/Los_Angeles

Step 4: GitArborist adds a friendly thumbs-up and pending status

Screenshot of GitHub Pull Request with thumbs-up reaction and pending GitArborist status

You sleep soundly Thursday night and have an awesome Friday and weekend, knowing that your post will go live at 9:00 a.m. Monday morning, even if you sleep in.