How I have added my Medium articles to GitHub profile page.

Wathsara Wishwantha Daluwatta
2 min readSep 10, 2020

Hello Guys!!.. Recently I tried lots of workflows in the GitHub to make my profile page a really attractive one. Before Moving into rest let me show you my profile.

Profile Page

What is actually a profile repository is? Let me explain. If you add a README file to the root of a public repository with the same name as your username, that README will automatically appear on your profile page. You can edit your profile README with GitHub Flavored Markdown to create a personalized section on your profile. What I am referring to as a profile repository is a repository created with the GitHub username.

I needed to add my Medium articles as a list to my profile page in GitHub. But I never wanted to update the list manually whenever I wrote an article. So I thought to create a GitHub workflow to do the job for me. Then I Implemented a really small python script and now I scheduled the job using the GitHub workflow.

Medium Articles

I am not going to explain how I did implement that using the python as it is really easy to understand. Anyone can see the implementation from the below link. (PRs are welcome as well)

Steps to run

1 . Add the following comments to your README

<!--START_SECTION:medium-->
<!--END_SECTION:medium-->

2. Create a workflow.

on:
schedule:
# Runs at every 2 days. Schedule it as you want.
- cron: '0 0 */2 * *'
jobs:
update-readme:
name: Update this repo's README
runs-on: ubuntu-latest
steps:
- uses: wathsara/medium-blogs-readme@master
with:
MEDIUM_HANDLER: '@wathsara' //Your Medium Handler
GH_TOKEN: ${{ secrets.GH_TOKEN }}
REPOSITORY: <username>/<repo-name>
DAYS: 30 // Show blogs wrote in last 30 days

Now its all done and the list will be updated every 2 days (Depends on how you schedule the job) on your profile page. All you have to do is keep writing. Check out my repository for more details.

Hope to see you guys with my next article. Have a Good Day and Stay safe!!

--

--

Wathsara Wishwantha Daluwatta

Software Engineer at WSO2 | Studied BSc (Hons) Software Engineering at University of Colombo School of Computing