-
Notifications
You must be signed in to change notification settings - Fork 213
39 lines (39 loc) · 1.3 KB
/
WebPageToMarkdown.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
name: Web Page To Markdown
on:
issues:
types: [opened]
jobs:
WebPageToMarkdown:
runs-on: ubuntu-latest
steps:
- name: Does the issue need to be converted to markdown
run: |
if [ "${{ github.event.issue.body }}" ]; then
if [[ "${{ github.event.issue.title }}" =~ ^\[Auto\]* ]]; then
:
else
echo "This issue does not need to generate a markdown file." 1>&2
exit 1;
fi;
else
echo "The description of the issue is empty." 1>&2
exit 1;
fi;
shell: bash
- name: Checkout
uses: actions/checkout@v2
with:
ref: ${{ github.head_ref }}
- name: Crawl pages and generate Markdown files
uses: freeCodeCamp-China/article-webpage-to-markdown-action@v0.1.8
with:
newsLink: '${{ github.event.issue.Body }}'
markDownFilePath: './chinese/articles/'
githubToken: ${{ github.token }}
- name: Git Auto Commit
uses: stefanzweifel/git-auto-commit-action@v4.9.2
with:
commit_message: '${{ github.event.issue.title }}'
file_pattern: chinese/articles/*.md
commit_user_name: PageToMarkdown Bot
commit_user_email: PageToMarkdown-bot@freeCodeCamp.org