DEV is a great community for developer content. If you have articles that you don’t want live all at once, how can you publish on a schedule automatically? In this article, let’s use GitHub Actions to get your content online on your timeline.
GitHub Actions is a way to run code on GitHub’s servers. The service is effectively a Continuous Integration (CI) service from GitHub. To use GitHub Actions, we create a workflow in a Git repository. That workflow contains all the steps to run the code we care about.
To publish to DEV, we can:
Before we get to the workflow, let’s look at the code that will run.
The first step in this whole process is to create a publishing schedule that our script can read. Minimally, that requires two types of data from a list of articles:
So, where do we get those things?
The first datum comes from your actual unpublished articles. From my observation, the DEV website does not expose this ID in an obvious fashion from the UI, but it’s not hard to find.
From your unpublished article page, view the source of the page. In both Firefox and Chrome, you can get to this by selecting “View Page Source” when you right click somewhere on the page.
View Page Source on Firefox
On the source page, search for article-id
with Ctrl+F
(or Cmd+F
on macOS). You should find a number value like 168727
.
#github #schedule #dev