DEV Community

Cover image for Update your dev.to articles into your Github profile
JackTT
JackTT

Posted on Edited on

Update your dev.to articles into your Github profile

In this article, I'll share you how to update your latest articles on dev.to into your Github profile.
Image description

What is Github profile

GitHub will display your profile README on your profile page if all of the following are true.

  • You've created a repository with a name that matches your GitHub username.
  • The repository is public.
  • The repository contains a file named README.md in its root.
  • The README.md file contains any content.

How to update articles into your repository

Follow the same approach as outlined in my previous article, Creating a Dynamic README.md File, I have recently developed another GitHub Action for updating your dev.to articles on your GitHub profile.

To do that, let's follow these straightforward steps:

Step 1: In your repository, create a file named README.md.template.

Step 2: Write anything you want within the README.md.template file.

Step 3: Embed one of the following entities within your README.md.template:

  • Article listing:
{{ template "article-list" .Articles }}
🔴 Live TV: jacktt/update your devto articles into your github profile dpi - Info Live Streaming 2026 🔴 Live TV: jacktt/update your devto articles into your github profile dpi - Info Live Streaming 2026

Image description

  • Article table:
{{ template "article-table" .Articles }}
🔴 Live TV: jacktt/update your devto articles into your github profile dpi - Info Live Streaming 2026 🔴 Live TV: jacktt/update your devto articles into your github profile dpi - Info Live Streaming 2026

Image description

If you are familiar with Go templates, you have access to the root variable, which includes the following fields:

  • Articles: An array of Article. You can view the Article struct definition in model/article.go.
  • Time: Updated Time

Step 4: Register Github Action

  • Create a file .github/workflows/update-articles.yml in your repository.
name: "Cronjob"
on:
 schedule:
  - cron: '15 0 * * *'

jobs:
    update-articles:
        permissions: write-all
        runs-on: ubuntu-latest
        steps:
            - uses: actions/checkout@v3
            - name: Generate README
              uses: huantt/article-listing@v1.1.0
              with:
                username: YOUR_USERNAME_ON_DEV_TO                
                template-file: 'README.md.template'
                out-file: 'README.md'
                limit: 5
            - name: Commit
              run: |
                git config user.name github-actions
                git config user.email github-actions@github.com
                git add .
                git commit -m "update articles"
                git push origin main
🔴 Live TV: jacktt/update your devto articles into your github profile dpi - Info Live Streaming 2026 🔴 Live TV: jacktt/update your devto articles into your github profile dpi - Info Live Streaming 2026

Step 5: Commit your change, then Github actions will run as your specified cron to update Articles into your README.md file

Source Code

See the source code and an example here: https://github.com/huantt/article-listing

Reference

Top comments (23)

🔴 Live TV: jacktt/update your devto articles into your github profile dpi - Info Live Streaming 2026
 
barrymichaeldoyle profile image
Barry Michael Doyle • • Edited

Awesome article!

It's probably worth noting for those who don't know, the update-articles.yml is a cron job that is set to run everyday 0:15 AM. So don't expect your GitHub profile to be updated immediately... You can obviously tweak that at the start to just check that it is working sooner rather than waiting overnight ;)

🔴 Live TV: jacktt/update your devto articles into your github profile dpi - Info Live Streaming 2026
 
ruthmoog profile image
ruthmoog •

Really cool using jobs for updating the articles. 👍

🔴 Live TV: jacktt/update your devto articles into your github profile dpi - Info Live Streaming 2026
 
kasir-barati profile image
Mohammad Jawad (Kasir) Barati • • Edited

Just a small feedback, there are those of us who have a README.md already and just want to append this at the end of existing README.md file. It is good to mention that in your article somewhere 🙂.

🔴 Live TV: jacktt/update your devto articles into your github profile dpi - Info Live Streaming 2026
 
sebastian_wessel profile image
Sebastian Wessel •

Thanks for this!
I added it, and it works as you can see here on my profile

🔴 Live TV: jacktt/update your devto articles into your github profile dpi - Info Live Streaming 2026
 
tanushree_aggarwal profile image
Tanushree Aggarwal •

Nice stuff! will definitely try this out!

🔴 Live TV: jacktt/update your devto articles into your github profile dpi - Info Live Streaming 2026
 
kumarkalyan profile image
Kumar Kalyan •

Great article definitely gonna try this out

🔴 Live TV: jacktt/update your devto articles into your github profile dpi - Info Live Streaming 2026
 
jacktt profile image
JackTT •

You can do it by placing your image in data/images/default-thumbnail.png

🔴 Live TV: jacktt/update your devto articles into your github profile dpi - Info Live Streaming 2026
 
tharos70 profile image
tharos70 •

Thanks a lot! It looks like something I was looking for!

🔴 Live TV: jacktt/update your devto articles into your github profile dpi - Info Live Streaming 2026
 
barrymichaeldoyle profile image
Barry Michael Doyle •

Just incase this catches anyone else out...

If your main branch is called 'master' instead of 'main', be sure to update that in the cron job, that caught me out :P

🔴 Live TV: jacktt/update your devto articles into your github profile dpi - Info Live Streaming 2026
 
jacktt profile image
JackTT •

Thank you.

🔴 Live TV: jacktt/update your devto articles into your github profile dpi - Info Live Streaming 2026
 
epi2024 profile image
Je Phiri •

Great