Update GitHub Profile with your Blog activity using GitHub Actions

Update GitHub Profile with your Blog activity using GitHub Actions

Introduction

GitHub Actions can do so much, We usually see it running automated tests, but it can update your GitHub Profile with your activity from other platforms like YouTube, Blog posts, and more! This blog post will teach you how to update your GitHub profile using GitHub actions.

We'll be using blog-articles.yml GitHub Action by Francesco Ciulla

Getting started

  • Go to your Profile ReadMe.

  • Add a heading (e.g. Recent articles on Hashnode).

  • Add the following code to your README.md

<!-- BLOG-POST-LIST:START -->
<!-- BLOG-POST-LIST:END -->
  • The workflow will replace the comment above with the list of published blog posts.

  • Save the changes by clicking on the Commit changes button.

  • Then go to your Readme file and click on "Add Files" & select Create New file

  • In the name field, enter .github/workflows/blog-post-workflow.yml

  • Add the following code to the Edit new file tab .

name: Latest blog articles
on:
  schedule: # Run workflow automatically
    - cron: '0 * * * *' # Runs every hour, on the hour
  workflow_dispatch: # Run workflow manually (without waiting for the cron to be called), through the Github Actions Workflow page directly
jobs:
  update-readme-with-hashnode-blog:
    name: Update this repo's README with the latest hashnode blog posts
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      - uses: gautamkrishnar/blog-post-workflow@master
        with:
          feed_list: "https://blog.francescociulla.com/rss.xml"

This will successfully create the workflow. It will fetch new blog posts from your Hashnode profile and add them to your README file every hour.

To learn more about GitHub workflow syntax, check out this Workflow Syntax documentation.

  • Next! Go to the actions tab in your Repository

  • Under All Workflows, click on Latest blog articles workflow.

  • In the Run workflow dropdown, click on the Run workflow button. The workflow will start executing.

  • Go to your GitHub profile page, and under the Recent Blog on Hashnode section, you’ll see a list of all the blog posts from the blogging platforms defined in the blog-post-workflow.yml file.

    e.g.

  • For video tutorial [Click Here](youtube.com/watch?v=oVS3M9IPZUM&t=3s)

Conclusion

Thank you for reading this Blog. Hope you learned something today!

If you found this guide helpful, please like, share, and follow us for more blog posts like this in the future & do tweet about it, and tag me!

My Twitter: https://twitter.com/intent/follow?screen_name=Arindam_1729

Did you find this article valuable?

Support Arindam Majumder by becoming a sponsor. Any amount is appreciated!