GitHub Action to get newest DEV.to posts and convert to Jekyll markdown
The “Convert DEV Posts to Jekyll Markdown Post GitHub Action” is a tool that automates the process of converting blog posts from DEV to Jekyll markdown and raising pull requests in a Jekyll blog post repository. It uses the DEV API to search for a DEV contributor’s latest blog posts and compares them to the latest post in the Jekyll repository. If a newer post is found, it creates a pull request with the DEV post converted to Jekyll markdown.
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 workflows folder.dev-to-jekyll.yml file:on:
schedule:
- cron: '0 0 * * 1,4'
jobs:
convert:
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v2
- name: Convert DEV Posts to Jekyll Markdown
uses: username/repo@v1
with:
dev-api-key: ${{/* secrets.DEV_API_KEY */}}
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 these steps are completed, the action will run every Monday and Thursday at midnight. If there are any new DEV posts during that time, it will automatically create the relevant pull requests in your Jekyll blog post repository for you to review.
The “Convert DEV Posts to Jekyll Markdown Post GitHub Action” is a powerful tool for developers using Jekyll and DEV.to for their blog posts. It automates the process of converting and syncing blog posts between the two platforms, saving time and effort. By seamlessly integrating with the DEV API and Jekyll repository, it ensures that the latest posts are always up-to-date and easily accessible in the Jekyll format. With its user-friendly installation process and regular schedule, it provides a convenient solution for developers to manage their blog posts efficiently.