In this post, we will create a Workflow which updates our GitHub Profile with out latest Blogs on dev.to. To do this, you will need:
- A GitHub Account
- A little of passion
LINKS:
- My GitHub (You can find an example here) - https://github.com/Zemerik/Zemerik
- YouTube Video - https://youtu.be/As7KgTZOrlE
- Source code - https://gist.github.com/Zemerik/ebb6f6af7c64173adf22aab5cd2c68a7
- Support - https://discord.gg/td5xqmzEcg
1. SET UP README.MD
- The first step in this process, is to define where we want our blogs. To do that, copy paste the following code in your README.md where you want your blogs:
<!-- BLOG-POST-LIST:START -->
<!-- BLOG-POST-LIST:END -->
NOTE: Your blogs will be showing in the middle of the two comments.
2. WORKFLOW
The next step in this process is to create a workflow to update our README.
Create a
blog-post-workflow.yml
file in the.github/workflows/
directory. Ensure your directory has no typo's!We now need to write the workflow in the file which we created. Copy paste the code below into that file:
name: 📚Blogs
on:
schedule:
# Runs every hour
- cron: '0 * * * *'
workflow_dispatch:
jobs:
update-readme-with-blog:
name: ✅Update with latest Blogs
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: gautamkrishnar/blog-post-workflow@master
with:
max_post_count: "4"
feed_list: "https://dev.to/feed/YOUR DEV.TO USERNAME HERE"
Remember to add your Dev.to username at the end of the URL on the last line
3. ACTIONS SETTINGS:
- Head over to the Settings tap located at the top.
- Navigate your way to
Actions > General
Tab from the left.
- Ensure that your settings match the settings below
4. EXECUTING:
- Finally, we are ready to run our workflow. To do so, first head over to the
Actions
tab on the top
- Select
📚Blogs
from the menu on the left.
- Click on the
Run workflow
dropdown, and click theRun workflow
button.
YOUR README SHOULD NOW HAVE BEEN UPDATED WITH YOUR LATEST BLOGS
SUMMARY:
In this blog, we successfully created and executed a workflow to update our Github Profile's README with our latest blogs on Dev.to. For any kind of support, you can refer to the Links
section at the top.
Top comments (0)