Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

Sorry, you do not have permission to ask a question, You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please type your username.

Please type your E-Mail.

Please choose an appropriate title for the post.

Please choose the appropriate section so your post can be easily searched.

Please choose suitable Keywords Ex: post, video.

Browse

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

Querify Question Shop: Explore Expert Solutions and Unique Q&A Merchandise

Querify Question Shop: Explore Expert Solutions and Unique Q&A Merchandise Logo Querify Question Shop: Explore Expert Solutions and Unique Q&A Merchandise Logo

Querify Question Shop: Explore Expert Solutions and Unique Q&A Merchandise Navigation

  • Home
  • About Us
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • About Us
  • Contact Us
Home/ Questions/Q 3035

Querify Question Shop: Explore Expert Solutions and Unique Q&A Merchandise Latest Questions

Author
  • 61k
Author
Asked: November 26, 20242024-11-26T10:59:08+00:00 2024-11-26T10:59:08+00:00

Automatically display your latest posts on your GitHub Profile README

  • 61k

Introduction

By creating a repository with the same name as your GitHub username (eg. bobbyiliev/bobbyiliev) you actually create a special repository. Its README.md will appear on your public profile.

In this post I will show you how to automatically display your latest posts on your GitHub Profile README.md file like this:

We will be using a GitHub action provided by Gautam krishna R called blog-post-workflow.

Let's get started!

Prerequisits

Before you get started you would need the following:

  • A GitHub account and a GitHub public profile repository. If you do not have one yet, you can follow the steps on how to create it here: Create a GitHub Profile README.md with widgets
  • You would also need a blog with an RSS feed. If you already have a DevDojo account or a DEV account you should be all set!

Cloning your repository

In order to set that you we will be using GitHub actions in order to automate the process.

The first thing that you would need to do is to clone your repository locally. To do so, visit your profile repo, click on the Code button and copy the link:

Then head over to your Git terminal and clone the repository:

git clone https://github.com/bobbyiliev/bobbyiliev.git 
Enter fullscreen mode Exit fullscreen mode

After that cd into the cloned repo:

cd bobbyiliev 
Enter fullscreen mode Exit fullscreen mode

Make sure to change bobbyiliev with your actual username

GitHub Actions

Once we have the project cloned locally, we need to create a .github folder and a workflows folder inside of it, we can use the mkdir command to do so:

mkdir -p .github/workflows 
Enter fullscreen mode Exit fullscreen mode

Once the .github/workflows, create a .yaml file with the name of the website that you will be using to import your posts from. For example, I will do this with DevDojo, so the name of the file would be devdojo.yaml:

touch .github/workflows/devdojo.yaml 
Enter fullscreen mode Exit fullscreen mode

With your favourite text editor, open the file and add the following content:

name: Latest DevDojo blog post workflow on:   schedule:     # Runs every day     - cron: '0 0 * * *'   workflow_dispatch:  jobs:   update-readme-with-blog:     name: Update this repo's README with latest blog posts     runs-on: ubuntu-latest     steps:       - uses: actions/checkout@v2       - uses: gautamkrishnar/blog-post-workflow@master         with:           comment_tag_name: "DEVDOJO"           feed_list: "https://devdojo.com/feed/bobbyiliev"           commit_message: "Update devdojo.com blog posts"           gh_token: ${{ secrets.GITHUB_TOKEN }} 
Enter fullscreen mode Exit fullscreen mode

Important: you need to change the feed_list value with the URL to your RSS feed.

In my case I am using DevDojo, so my RSS feed is https://devdojo.com/feed/bobbyiliev. For Dev.to it would be https://dev.to/feed/bobbyiliev and for other providers it might be different.

As you can see under the steps section we are using a GitHub action provided by Gautam krishna R called blog-post-workflow.

The cron: '0 0 * * *' specifies that the action will run every day at midnight.

Update your README.md file

Once you have the GitHub workflow in place, you need to also update your README.md file and add the following in the section where you want your posts to be displayed at:

# 📖 Latest Blog posts <!-- DEVDOJO:START --> <!-- DEVDOJO:END --> 
Enter fullscreen mode Exit fullscreen mode

The part before the START and END keywords needs to match exactly with the comment_tag_name value from the YAML file above.

Once you make the changes, save the file, commit it and push the changes to GitHub:

  • Stage the files:
git add . 
Enter fullscreen mode Exit fullscreen mode

  • Commit your changes:
git commit -m "Add DevDojo blog-post-workflow" 
Enter fullscreen mode Exit fullscreen mode

  • Push your changes to GitHub:
git push origin main 
Enter fullscreen mode Exit fullscreen mode

With that your README.md profile will be updated every day at midnight.

To manually execute the workflow, go to Actions -> click on the Workflow -> and from the dropdown choose Run Workflow:

This will take a few seconds to run and it will update your README.md file with your latest posts!

As an example you could take a look at my workflows here:

GitHub Workflows Example

Conclusion

If you like this GitHub action, make sure to star it on GitHub here:

Blog post workflow

Hope that you find this useful! If you want to learn more about Git and GitHub check out this free eBook here:

💡 Introduction to Git and GitHub

gitgithubwebdevwriting
  • 0 0 Answers
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

Sidebar

Ask A Question

Stats

  • Questions 4k
  • Answers 0
  • Best Answers 0
  • Users 1k
  • Popular
  • Answers
  • Author

    How to ensure that all the routes on my Symfony ...

    • 0 Answers
  • Author

    Insights into Forms in Flask

    • 0 Answers
  • Author

    Kick Start Your Next Project With Holo Theme

    • 0 Answers

Top Members

Samantha Carter

Samantha Carter

  • 0 Questions
  • 20 Points
Begginer
Ella Lewis

Ella Lewis

  • 0 Questions
  • 20 Points
Begginer
Isaac Anderson

Isaac Anderson

  • 0 Questions
  • 20 Points
Begginer

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help

Footer

Querify Question Shop: Explore Expert Solutions and Unique Q&A Merchandise

Querify Question Shop: Explore, ask, and connect. Join our vibrant Q&A community today!

About Us

  • About Us
  • Contact Us
  • All Users

Legal Stuff

  • Terms of Use
  • Privacy Policy
  • Cookie Policy

Help

  • Knowledge Base
  • Support

Follow

© 2022 Querify Question. All Rights Reserved

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.