One minute
How to Schedule a Deployment on Github
This website is made with Hugo and it’s deployed using GitHub Actions. This is supercool because I can have a website without having to maintain any webserver, just paying a AWS S3 bucket.
What I do is that once I got an idea to publish here I write the post but usually I do it during the weekend so most of my posts would get published between saturday and sunday.
To avoid that I set the date in the future so it doesn’t appear immediately in the site. But I need something that triggers the Hugo deployment so at some point the posts get published.
To do that I configured the GitHub workflow with a schedule trigger like this:
on:
schedule:
- cron: '0 8 * * *'
With that the deployment action gets triggered every day at 8:00 UTC.