More Premium Hugo Themes Premium Jekyll Themes

Dev Posts To Jekyll Markdown Action

GitHub Action to get newest DEV.to posts and convert to Jekyll markdown

Dev Posts To Jekyll Markdown Action

GitHub Action to get newest DEV.to posts and convert to Jekyll markdown

Author Avatar Theme by hummusonrails
Github Stars Github Stars: 6
Last Commit Last Commit: Jan 24, 2021 -
First Commit Created: May 5, 2023 -
Dev Posts To Jekyll Markdown Action screenshot

Overview

The “Convert DEV Posts to Jekyll Markdown Post GitHub Action” is an action that allows users to automatically convert their latest DEV blog posts into Jekyll markdown and raise pull requests in their Jekyll repository. By leveraging the DEV API, the action checks for any new DEV posts and compares them with the latest post in the Jekyll repository. If a newer DEV post is found, it converts the post to Jekyll markdown and creates a pull request in the repository for review.

Features

  • Search and Retrieve DEV Posts: The action uses the DEV API to search and retrieve a DEV contributor’s latest blog posts.
  • Comparison of Post Dates: The action checks if the newest DEV post is newer than the latest post in the Jekyll repository.
  • Automatic Conversion to Jekyll Markdown: If the DEV post is newer, the action converts the post to Jekyll markdown format.
  • Pull Request Creation: The action raises a pull request in the Jekyll repository with the converted DEV post as a new post.

Installation

To use this action in your Jekyll blog post repository, follow these steps:

  1. Add a .github/workflows folder to your repository.
  2. Create a dev-to-jekyll.yml file inside the folder.
  3. Copy and paste the following code snippet into the dev-to-jekyll.yml file:
name: Convert DEV Posts to Jekyll Markdown Post

on:
  schedule:
    - cron: '0 0 * * 1,4'

jobs:
  convert_posts:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout repository
        uses: actions/checkout@v2
      
      - name: Convert DEV Posts to Jekyll Markdown Post
        uses: username/repo@release-tag
        with:
          DEV_API_KEY: ${{/* secrets.DEV_API_KEY */}}
          REPO_OWNER: ${{/* secrets.REPO_OWNER */}}
          REPO: ${{/* secrets.REPO */}}
  1. Add the following secrets to your repository:
    • DEV_API_KEY: Your API key from DEV.to.
    • REPO_OWNER: The owner of the repository (e.g., “jane”).
    • REPO: Your repository name (e.g., “sample-repository”).

Once you have completed the installation steps, the action will run every Monday and Thursday at midnight. If there are any new DEV posts during that time, relevant pull requests will be created for you to review.

Summary

The “Convert DEV Posts to Jekyll Markdown Post GitHub Action” simplifies the process of converting and integrating new DEV blog posts into a Jekyll repository. With automated retrieval, comparison, and conversion, users can easily keep their Jekyll blogs up-to-date with their latest DEV posts. By raising pull requests, the action ensures a seamless workflow for reviewing and incorporating new content. This action offers a convenient solution for developers who use both DEV and Jekyll as their blogging platforms.