<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Denz Mek</title>
    <description>The latest articles on DEV Community by Denz Mek (@denzmek).</description>
    <link>https://dev.to/denzmek</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3391553%2F9260154c-0f07-41fa-a6f7-68664910c305.png</url>
      <title>DEV Community: Denz Mek</title>
      <link>https://dev.to/denzmek</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/denzmek"/>
    <language>en</language>
    <item>
      <title>Automating Blog Posts to Dev.to with GitHub Actions</title>
      <dc:creator>Denz Mek</dc:creator>
      <pubDate>Sun, 27 Jul 2025 13:02:31 +0000</pubDate>
      <link>https://dev.to/denzmek/automating-blog-posts-to-devto-with-github-actions-2gjj</link>
      <guid>https://dev.to/denzmek/automating-blog-posts-to-devto-with-github-actions-2gjj</guid>
      <description>&lt;p&gt;Hey Dev.to 👋&lt;/p&gt;

&lt;p&gt;Just wanted to share a quick setup I’m using to publish posts directly to Dev.to using GitHub Actions.&lt;/p&gt;

&lt;p&gt;Basically, I write my blog in Markdown, commit it to GitHub, and the post goes live automatically. No manual copy-paste, no forgetting to publish. Super simple, but saves time and keeps everything version-controlled.&lt;/p&gt;

&lt;p&gt;This post itself was published that way.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why bother?
&lt;/h2&gt;

&lt;p&gt;I got tired of switching between editors, formatting things twice, or forgetting what I published where. So I wrote a small Python script that pushes the post to Dev.to, and wrapped it in a GitHub Action. Now it’s just:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git push
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;…and boom 💥 — post is live.&lt;/p&gt;

&lt;h2&gt;
  
  
  How it works
&lt;/h2&gt;

&lt;p&gt;You just need:&lt;/p&gt;

&lt;p&gt;A publish_to_devto.py script (uses the Dev.to API)&lt;/p&gt;

&lt;p&gt;Your blog posts in a /posts folder&lt;/p&gt;

&lt;p&gt;A GitHub Action that runs the script on push&lt;/p&gt;

&lt;p&gt;Your Dev.to API key stored as a GitHub secret&lt;/p&gt;

&lt;p&gt;That’s it.&lt;/p&gt;

&lt;p&gt;Folder layout&lt;br&gt;
Here’s what the repo looks like:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;.&lt;/span&gt;
├── posts/
│   └── hello-devto.md
├── publish_to_devto.py
├── .github/workflows/publish.yml
├── requirements.txt
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  One-time setup
&lt;/h2&gt;

&lt;p&gt;Add your Dev.to API key as a GitHub secret (e.g., DEVTO_API_KEY)&lt;/p&gt;

&lt;p&gt;Write your blog in Markdown&lt;/p&gt;

&lt;p&gt;Push to GitHub&lt;/p&gt;

&lt;p&gt;That’s it — your post will show up on your Dev.to profile.&lt;/p&gt;

&lt;p&gt;This is the first one I’ve published using the flow — just testing it out, and so far it works.&lt;/p&gt;

&lt;p&gt;Will share the code and full setup in the next post if anyone’s interested.&lt;/p&gt;

&lt;p&gt;Cheers 👋&lt;/p&gt;

</description>
    </item>
  </channel>
</rss>
