Skip to content

Commit

Permalink
feat: add GitHub action & issue form for Original fetching
Browse files Browse the repository at this point in the history
  • Loading branch information
TechQuery committed Dec 31, 2023
1 parent 57c0c8b commit 3d4d8b1
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 0 deletions.
16 changes: 16 additions & 0 deletions .github/ISSUE_TEMPLATE/translation.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: 📑 Translation Task
description: 创建翻译任务

title: <原文标题>
labels:
- 📖 documentation
body:
- type: input
attributes:
label: 原文网址
placeholder: 如 https://mobx.js.org/enabling-decorators.html
validations:
required: true
- type: textarea
attributes:
label: 备注
24 changes: 24 additions & 0 deletions .github/workflows/fetch-original.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Fetch Original Document pages
on:
issues:
types:
- labeled
jobs:
Fetch-and-Save:
if: github.event.label.name == '📖 documentation'
runs-on: ubuntu-latest
permissions:
contents: write
issues: write
steps:
- uses: actions/checkout@v4

- uses: freeCodeCamp-China/article-webpage-to-markdown-action@v1
with:
newsLink: "${{ github.event.issue.Body }}"
markDownFilePath: "./docs/"
githubToken: ${{ github.token }}

- uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: "${{ github.event.issue.title }}"

0 comments on commit 3d4d8b1

Please sign in to comment.