Auto Dev.to’s posts updater on GitHub readme

To show your latest dev.to posts in the GitHub page readme is awesome 🌈, because:

Show you’re actively creating blogs ✍️
Github page’s viewers become familiar with your Dev.to blog 🚀

But how to achieve this:

1. The first step is ( Create …


This content originally appeared on DEV Community 👩‍💻👨‍💻 and was authored by vito.mohagheghian

To show your latest dev.to posts in the GitHub page readme is awesome 🌈, because:

  1. Show you're actively creating blogs ✍️
  2. Github page's viewers become familiar with your Dev.to blog 🚀

But how to achieve this:

1. The first step is ( Create a username repo )

Make a repository in your GitHub page with your own username - if you haven't created that yet.
like this: https://github.com/vito-mohagheghian/vito-mohagheghian

And will appear in your profile like this.

Image description

2. Edit readme.md File

Copy/Paste the code below, where you wanna your latest blogs appear in the readme.md file.

they won't appear in preview mode.

## Latest Blog posts
<!-- BLOG-POST-LIST:START -->
<!-- BLOG-POST-LIST:END -->

3. Create a .github folder

Clone your repository in your device using git clone [your repo's address].
like this git clone https://github.com/vito-mohagheghian/vito-mohagheghian.git

Image description

Make new a new folder named .github and inside of this, make a new folder named workflows, then create a new folder like this: blog-post-workflow.yml

Modify .yml file

Copy/Paste the code below and just replace your dev.to username with mine in feed_list.

name: Latest blog post workflow
on:
  schedule:
    # Runs every hour
    - cron: '0 * * * *'
  workflow_dispatch:

jobs:
  update-readme-with-blog:
    name: Update this repo's README with the latest blog posts
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      - uses: gautamkrishnar/blog-post-workflow@v1
        with:
          max_post_count: "3"
          remove_duplicates: true
          feed_list: "https://dev.to/feed/vitomohagheghian"

You can also change max_post_count and remove_duplicates values.

Push Changes to github

push changes you made with the following commands.

git add .
git commit -m "add workflows"
git push

Run Github Actions

Now go to your GitHub repository, and go to the Actions tab.

Image description

You will see your workflow below 'all workflows', then click on Run workflow, and run it.

Congratulation 🎓, You have your own auto Github blog posts updater 🦄.

Keep in touch

Keep Coding Y'All 👨🏻‍💻


This content originally appeared on DEV Community 👩‍💻👨‍💻 and was authored by vito.mohagheghian


Print Share Comment Cite Upload Translate Updates
APA

vito.mohagheghian | Sciencx (2023-02-04T19:29:04+00:00) Auto Dev.to’s posts updater on GitHub readme. Retrieved from https://www.scien.cx/2023/02/04/auto-dev-tos-posts-updater-on-github-readme/

MLA
" » Auto Dev.to’s posts updater on GitHub readme." vito.mohagheghian | Sciencx - Saturday February 4, 2023, https://www.scien.cx/2023/02/04/auto-dev-tos-posts-updater-on-github-readme/
HARVARD
vito.mohagheghian | Sciencx Saturday February 4, 2023 » Auto Dev.to’s posts updater on GitHub readme., viewed ,<https://www.scien.cx/2023/02/04/auto-dev-tos-posts-updater-on-github-readme/>
VANCOUVER
vito.mohagheghian | Sciencx - » Auto Dev.to’s posts updater on GitHub readme. [Internet]. [Accessed ]. Available from: https://www.scien.cx/2023/02/04/auto-dev-tos-posts-updater-on-github-readme/
CHICAGO
" » Auto Dev.to’s posts updater on GitHub readme." vito.mohagheghian | Sciencx - Accessed . https://www.scien.cx/2023/02/04/auto-dev-tos-posts-updater-on-github-readme/
IEEE
" » Auto Dev.to’s posts updater on GitHub readme." vito.mohagheghian | Sciencx [Online]. Available: https://www.scien.cx/2023/02/04/auto-dev-tos-posts-updater-on-github-readme/. [Accessed: ]
rf:citation
» Auto Dev.to’s posts updater on GitHub readme | vito.mohagheghian | Sciencx | https://www.scien.cx/2023/02/04/auto-dev-tos-posts-updater-on-github-readme/ |

Please log in to upload a file.




There are no updates yet.
Click the Upload button above to add an update.

You must be logged in to translate posts. Please log in or register.