Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/skyfe79/hugo-with-github-issues
hugo-with-github-issues
https://github.com/skyfe79/hugo-with-github-issues
actions
Last synced: 10 days ago
JSON representation
hugo-with-github-issues
- Host: GitHub
- URL: https://github.com/skyfe79/hugo-with-github-issues
- Owner: skyfe79
- License: mit
- Created: 2021-08-13T12:16:19.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2023-01-17T03:58:58.000Z (almost 2 years ago)
- Last Synced: 2024-10-20T22:37:54.218Z (26 days ago)
- Topics: actions
- Language: JavaScript
- Homepage:
- Size: 1.04 MB
- Stars: 12
- Watchers: 3
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Convert Github issues to markdowns.
`hugo-with-github-issues` converts github issues to markdowns. Github issue has a title and comments. `hugo-with-github-issues` connects comments to the one body content. Github issue supports to upload images to the comments so markdown can contains images.
## Example Repo
- [https://github.com/skyfe79/testing-hugo-with-github-issues](https://github.com/skyfe79/testing-hugo-with-github-issues)
### This issue is
- [https://github.com/skyfe79/blog.contents/issues/9](https://github.com/skyfe79/blog.contents/issues/9)
### converted below the post:
- [https://blog.burt.pe.kr/posts/skyfe79-blog.contents-970590914-post-9/](https://blog.burt.pe.kr/posts/skyfe79-blog.contents-970590914-post-9/)
### Command Labels
- `::./content/{specific folder name}` - store markdown file to the `content/{specific folder name}`
- `::DRAFT` - skip conversion.
- `::DONE` - skip conversion.## Usage
This is workflow example:
```yml
name: "Convert issues to markdowns"
on:
workflow_dispatch:
jobs:
convert_issues_to_markdown_job:
runs-on: ubuntu-latest
name: Convert issues to markdowns.
steps:
- name: checkout
uses: actions/checkout@v1
- name: Fetch issues and generate markdowns
uses: skyfe79/[email protected]
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
repo: 'testing-hugo-with-github-issues'
owner: 'skyfe79'
skip-author: 'utterances-bot'
use-issue-seperator: 'false'
output: 'content/posts'
- name: Commit files
run: |
git config --local user.email "[email protected]"
git config --local user.name "sungcheol kim"
git add .
git commit -m "Add Posts"
- name: Push changes
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: ${{ github.ref }}
```## Inputs
```
github-token:
description: 'github token'
required: truerepo:
description: 'repo to export'
required: trueowner:
description: 'repo owner'
required: trueskip-author:
description: 'skip issue written by the skip-author'
required: falseskip-pull-requests:
description: 'skip pull request issue'
required: true
default: falseissue-state:
description: 'export issues only in state(all, open or closed)'
required: true
default: 'all'use-issue-seperator:
description: 'use seperator among comments'
required: true
default: 'false'output:
description: 'destination folder to store markdown files'
required: true
default: 'content'
```