DEV Community

Cover image for Version and automate your publishing with GitHub Actions
Rémy 🤖
Rémy 🤖

Posted on • Updated on • Originally published at

Version and automate your publishing with GitHub Actions

I love publishing on, yet there is a very big problem related to doing this: the web editor is not really dev-friendly since it doesn't allow you to version your content. There is also the constant fear of doing something wrong and losing an article that you wrote within the browser because of stupid computer crash or other kinds of CTRL+Q disasters.

Yet, faced with a challenge, what do devs do? They dev!

First things first, I've created a GitHub repo to manage all my upcoming Markdown files. Now I've got a place where to store my articles but how do I get them online?

Apparently the hot new thing is GitHub actions. So I created one in my repo! The GitHub interface is surprisingly intuitive for doing so. I'm absolutely no expert on the matter since I wrote my first action ever about 5 minutes ago, but it's fairly easy to use since that same action published this very article!

In order to be able to publish using GitHub actions, you need some kind of script. I couldn't find anybody who did that (but maybe did I search not enough?) so I created my own tool. Let me introduce DEV-CLI! 🎉 You'll find all the details in the README. You can of course use it right now to publish your Markdown, with or without GitHub actions 😇

I must say that this was a fun evening project. It's still completely experimental and I'd love feedback from other people doing the same thing — or not doing this if they have alternative workflows!

Top comments (5)

scriptautomate profile image
Derek Ardolf • Edited

Thank you for making this. I have used Jekyll and Hugo static website generator frameworks that use Markdown for the blog formatting. I'll be testing how easy your tool makes integrating a GitHub Action to duplicate posts onto this platform.

lepinekong profile image

Great, I may publish again on in the future ;)

bak3y profile image

Super cool, I'm going to pivot to this publishing method ASAP.

dev_ganesh profile image
Ganesh Kumar T K

Woah! Gonna try this ✌😃

saurabhdaware profile image
Saurabh Daware 🌻

So cool! I love CLIs 🌻