Skip to content
You're viewing an older version of this GitHub Action. Do you want to see the latest version instead?
hash

GitHub Action

Hashnode Blog Action

v0.0.4

Hashnode Blog Action

hash

Hashnode Blog Action

Action to pull your latest blog and show it in a nice format

Installation

Copy and paste the following snippet into your .yml file.

              

- name: Hashnode Blog Action

uses: Sachin-chaurasiya/[email protected]

Learn more about this action in Sachin-chaurasiya/hashnode-blog-action

Choose a version

Hashnode Blog GitHub Action - Latest Hashnode Public API Support

Action to pull your latest blog from hashnode and show it in a nice format

⚙️ Configuration

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) table false
FILE Filename to save the output README.md false
DEBUG Debug mode false false

🚀 Usage

💾 In Repository File

Step 1: Include the Following Content in Your README.md or Any File for Display

## My Latest Blog Posts 👇

<!-- HASHNODE_BLOG:START -->
<!-- HASHNODE_BLOG:END -->

Step 2: Configure The Workflow

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
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

image