title | published | description | series | tags | cover_image | canonical_url | ||||
---|---|---|---|---|---|---|---|---|---|---|
TheActionDev - v3 |
true |
v3 Release notes for 'TheActionDev' GitHub Action |
TheActionDev |
|
{% twitter 1539205426902106112 %}
TheActionDev is Github Action that allows you to write & upsert dev.to articles without touching the dev.to
UI. This action is initiated in ActionsHackathon and using forem API.
The main goal of TheActionDev is that we can write articles in favorite text editor, make articles collaborative like open source software and, to have version control system for article as software .
https://github.com/marketplace/actions/theactiondev
There is nothing new in v3 but minor changes have been made to the development workflow, Mainly releases tags and branches. Now release tags follow semantic versions with the v
prefix. This release pattern allows us to point to a specific version tag and also helps us to merge commits into release branches from main
without re-creating the already released version. You can view all changes of v3 in the project's git history.
The main reason behind this release is native YAML support in front-matter thanks to js-yaml library. This means you have to assign the tags
key as yaml arrays otherwise, Action will throw an error or ignore the assigned tags.
---
...
- tags: typescript, javascript, github
+ tags:
+ - typescript
+ - javascript
+ - github
...
---
...
Other than that, You will find the updated notice in the README#Notice section as we'll introduce any kind of breaking changes or deprecations.
- You'll first need to create a YAML file to describe the workflow in your project (e.g. .github/workflows/TheActionDev.yml).
- Generate dev.to
apiKey
by following Forem API Docs - Add your
apiKey
to GitHub SecretDEVTO_API_KEY
by following GitHub Docs
name: TheActionDev Sync
on:
push:
branches:
- main # your default branch
jobs:
operations:
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v2
- name: Sycing Article to dev.to
uses: ful1e5/TheActionDev@v3
with:
api-key: ${{ secrets.DEVTO_API_KEY }} # Store your 'api-key' in Github Secret
directory: ./articles # Your article directory
ignore: Development.md, Production.md # Markdown file you wan't to ignore. Multple files separated by ,(comma)
Custom variables set for each post, located between the triple-dashed lines in your editor Here is a list of possibilities:
- published: boolean that determines whether or not your article is published
- description: description area in Twitter cards and open graph cards
- tags: max of four tags, needs to be comma-separated
- canonical_url: link for the canonical version of the content
- cover_image: cover image for post, accepts a URL. The best size is 1000 x 420.
- series: post series name.
tag | value | required |
---|---|---|
title | null |
yes |
published | false |
no |
description | null |
no |
tags | [] |
no |
canonical_url | null |
no |
cover_image | null |
no |
series | null |
no |
- Use YAML to write and format article's front-matter.
- Follow dev.to editor guide for write and format article body.
- You can also use Liquid tags to add rich content such as Tweets, YouTube videos, etc.
---
title: Hello from TheActionDev
description: Hello World
published: false
tags:
- showdev
- github
series: foo
---
Just Setup **TheActionDev** for writing dev.to artcles.
{% github ful1e5/TheActionDev %}
You're able track your article status in Actions tab.
If something is missing in the documentation or if you found some part confusing, please file an issue on the repository with your suggestions for improvement, or tweet at the @ful1e5 account. I love hearing from you!
Support my work with $1 or more on GitHub Sponsors.
{% github ful1e5/TheActionDev %}