Easily post to your md blog (e.g. Hexo) using GitHub Issue.
Create .github/workflows/blog.yml
.
name: Create/Update blog post
on:
- issues
jobs:
run:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: nzws/blog-at-issue-action@master
with:
token: ${{ secrets.GITHUB_TOKEN }}
filepath: 'blog-post/posts/{title}.md'
label: 'blog' # Optional
use-prettier: 'format' # Optional
use-textlint: 'format' # Optional
Inputs:
token
: GitHub's token (Use${{ secrets.GITHUB_TOKEN }}
)filepath
: The path of the markdown to save.{title}
: Issue's title
label
: (Optional, default:'blog'
) An issue labels to trigger.use-prettier
: (Optional, default: false) Format the markdown. The formatting result is also reflected in Issue.'lint'
or'format'
orfalse
- Using project's prettier config.
use-textlint
: (Optional, default: false) Check the grammar of the text. If corrections are needed, send you the comment.'lint'
or'format'
orfalse
- Using project's textlint config.
NOTE: You need to delete the branch that was created.
- code: MIT