DEV Community

Johannes Konings
Johannes Konings

Posted on • Updated on

What is the best way to publish/update a markdown blog post from a git repo to dev.to via continuous deployment?

Hi 👋,

I'm thinking about to have my blog posts as markdown files in a git repo, which are automatically are published to dev.to. Also a change at the markdown file should trigger a change to the dev.to blog post.
What are the best ways?

I found following approaches on GitHub:

GitHub logo sinedied / publish-devto

📮 GitHub Action to publish markdown files on dev.to platform, with assets hosted on GitHub.

📮 publish-devto

Build Status XO code style License

GitHub Action to publish markdown files on dev.to platform, with assets hosted on GitHub.

See this example repository for usage and setup.




GitHub logo tylerauerbeck / publish-to-dev.to-action

A GitHub Action that allows you to publish an article to Dev.to

publish-to-dev.to-action

Disclaimer

This is a work in progress. Currently it provides initial functionality to publish\update an article to the Dev.to blogging platform.

What does this action do?

This action takes a file that provides a listing of files that you are interested in (i.e. files that were changed in a pull request, provided by a previous action or step) and then scrapes that list for markdown files. Once it has filtered for just markdown files, it then assembles an appropriate json request and sends it to Dev.to. As long as everything is successful, the action will let you know that the article has been pushed to dev.to. Otherwise it will let you know that the file has failed and it will fail that run of the action.

Assumptions

This action assumes that you are using frontmatter in your markdown to provide a number of required fields. This was done as…

And also some on dev.to:

Update 18.08.2020

Thanks.

Top comments (2)

Collapse
 
jamesmcmahon profile image
James McMahon • Edited

I’d love to know as well. Do you have any opinions about the two solutions you listed?

Collapse
 
johanneskonings profile image
Johannes Konings

I had a quick look at publish-devto. Unfortunately, I couldn't get it to work.
If there is no other recommendation, I'll check publish-to-dev.to-action next 😄