Hashnode Blog GitHub Action - Latest Hashnode Public API Support
GitHub action to fetch and display your latest blog from Hashnode in a visually pleasing manner
Option | Description | Default | Required |
---|---|---|---|
HASHNODE_PUBLICATION_NAME |
Your hashnode publication name, Example: blog.hashnode.dev | null | true |
POST_COUNT |
Number of posts count | 6 | false |
FORMAT |
Output format (table, list, card, stacked) | table |
false |
FILE |
Filename to save the output | README.md |
false |
DEBUG |
Debug mode | false | false |
## My Latest Blog Posts 👇
<!-- HASHNODE_BLOG:START -->
<!-- HASHNODE_BLOG:END -->
name: 'Hashnode Blogs'
on:
workflow_dispatch:
schedule:
- cron: '0 0 * * *' # Runs Every Day
jobs:
update_blogs:
name: 'Hashnode Latest Blogs'
runs-on: ubuntu-latest
steps:
- name: 'Fetch Repository Contents'
uses: actions/checkout@main
- name: 'Hashnode Blog Action'
uses: 'Sachin-chaurasiya/hashnode-blog-action@main'
with:
HASHNODE_PUBLICATION_NAME: 'blog.hashnode.dev'
POST_COUNT: 6
FORMAT: 'list'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
🚀 Live Example : Sachin-chaurasiya/Sachin-chaurasiya
git clone https://github.com/<your-name>/hashnode-blog-action.git
cd hashnode-blog-action
npm install
Add unit test for your changes tests
The below command will
- Format your code
- Lint your code
- Run the unit tests and coverage
- And Finally bundle everything
npm run all
git add .
git commit -m "meaningful commit message"
git push <branch_name>
Hashnode blog action is licensed under the MIT License - see the LICENSE file for details.
We ❤️ all contributions, big and small! Check out our CONTRIBUTING guide to get started and let us know how we can help.
Don't want to miss anything? Give the project a ⭐ 🚀
A HUGE THANK YOU to all our supporters!