How to Add Your Recently Published Articles to Your GitHub Profile README using GitHub Actions 🤖
Tags: webdev, codenewbie, 100daysofcode, beginners
Published: 2020-11-18 19:00:00

_Do you want to show off your articles on GitHub?_ 🤭 

If you said _**YES**_, Then you're at the right place. By the end of this article, you'll have your latest articles listed on your GitHub Profile README.

> 📌 TL;DR - Before we begin, You must have your GitHub account and make sure you've created your GitHub profile. If not, you can check this  [article](https://www.aboutmonica.com/blog/how-to-create-a-github-profile-readme)  by  [Monica Powell](https://twitter.com/waterproofheart).

### 🏃🏼Let's Begin!!!

> 💡 If you're new to GitHub Actions, go check out the  [official documentation](https://docs.github.com/en/free-pro-team@latest/actions/learn-github-actions/introduction-to-github-actions#:~:text=GitHub%20Actions%20are%20event%2Ddriven,executes%20a%20software%20testing%20script.).

We'll be using  [blog-post-workflow](https://github.com/gautamkrishnar/blog-post-workflow) GitHub Action by  [Gautam krishna R](https://twitter.com/gautamkrishnar).  

#### 🤔 How to use this GitHub Action?

1. Visit your GitHub Profile README repository
```link
https://github.com/{USER-NAME}/{USER-NAME}
```

2. You'll need to add the following section to your **README.md** file
```js
# 📩 Latest Blog Posts // You can name it whatever you want.
<!-- BLOG-POST-LIST:START -->
<!-- BLOG-POST-LIST:END -->
```

3. Now, create a folder `.github` in the root directory & within that directory create another folder named `workflows`. Now, inside the `workflows` directory create a new  [YAML](https://yaml.org/)  file `blog-post-workflow.yml`. This is how your folder structure should look like:
```js
.github 
   └───workflows
            blog-post-workflow.yml
```

4. Add the following content in the `blog-post-workflow.yml` file
```yml
name: Latest blog post workflow
on:
    schedule: # Run workflow automatically
      # This will make it run every hour
      - cron: '0 * * * *' 
     # Run workflow manually (without waiting for the cron to be called), through the Github Actions Workflow page directly
    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:
            # Replace this URL with your rss feed URL/s
            feed_list: "https://iamdarshshah.hashnode.dev/rss.xml"
```

5. Commit your code and wait for your actions to run automatically or here are the steps to trigger it manually:

 - Click on `Actions`:
![Capture.PNG](https://cdn.hashnode.com/res/hashnode/image/upload/v1605724408453/Wo6QXLDyo.png)

 - Now, Click on `Latest blog post workflow`:
![Capture-1.PNG](https://cdn.hashnode.com/res/hashnode/image/upload/v1605724588566/mKiVUYqRu.png)

 - Then, click on `Run workflow` to trigger the GitHub Action:
![Capture-3.PNG](https://cdn.hashnode.com/res/hashnode/image/upload/v1605724752771/8k985nGoa.png)

> NOTE: You can add any popular blogging platform's RSS feed URL. ([List of Platforms](https://github.com/gautamkrishnar/blog-post-workflow#popular-sources)) 

This is it! We did it. 🎉

Now, you can check your GitHub Profile README that lists your latest published articles. 🎊

#### 👀This is How it should look 

<p align="center">
<img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1605720484968/GPlrXMw7q.png" alt="cover image" />
</p>

> ⚙️ If you want to customize your GitHub Action, then have a look at all available [options](https://github.com/gautamkrishnar/blog-post-workflow#options)  you can provide custom values to.

Thanks, for reading it till the end. 🙏

------

Hope you find it useful! Let me know your thoughts on this in the comments section. Don't forget to share this article with your friends or colleagues. Feel free to connect with me on any of the platforms below! 🚀

 [Twitter](https://twitter.com/iamdarshshah)  |  [LinkedIn](https://www.linkedin.com/in/iamdarshshah/)  |  [GitHub](https://github.com/iamdarshshah) 

-----

#### References:
- GitHub Action - https://github.com/gautamkrishnar/blog-post-workflow
- Image Source - https://unsplash.com/photos/RLw-UC03Gwc