GitHub Action to get newest DEV.to posts and convert to Jekyll markdown
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.
To use this action in your Jekyll blog post repository, follow these steps:
.github/workflows folder to your repository.dev-to-jekyll.yml file inside the folder.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 */}}
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.
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.