From ffb35aff480813b34fa4cd368463def25175c961 Mon Sep 17 00:00:00 2001 From: luojiyin1987 Date: Thu, 8 Aug 2024 14:24:06 +0000 Subject: [PATCH 01/14] Auto Format --- chinese/articles/coding-bootcamp-handbook.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chinese/articles/coding-bootcamp-handbook.md b/chinese/articles/coding-bootcamp-handbook.md index 4a8c216f1..0e0d6630f 100644 --- a/chinese/articles/coding-bootcamp-handbook.md +++ b/chinese/articles/coding-bootcamp-handbook.md @@ -389,7 +389,7 @@ Surprisingly, there are a few bootcamps that are for-profit but still free. And 要了解参加编码训练营的真实成本,你应该考虑机会成本。 -**例子**:你现在每个月赚$3000美元。你搬到旧金山,在那$2,000 美元只能租到一个卧室。你参加 12 周的训练营费用是\$15,00 0美元。 +**例子**:你现在每个月赚$3000美元。你搬到旧金山,在那$2,000 美元只能租到一个卧室。你参加 12 周的训练营费用是\$15,00 0美元。 这是你的真实成本,假设加上你在 6 个月的时间内找到工作并领取第一份薪水: From 6cf82fa6d935253146e01140f62ae8ce2ad544a4 Mon Sep 17 00:00:00 2001 From: luojiyin Date: Thu, 8 Aug 2024 22:30:52 +0800 Subject: [PATCH 02/14] markdown to yml --- .../{AutoGenerateMarkdown.md => AutoGenerateMarkdown.yml} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename .github/ISSUE_TEMPLATE/{AutoGenerateMarkdown.md => AutoGenerateMarkdown.yml} (100%) diff --git a/.github/ISSUE_TEMPLATE/AutoGenerateMarkdown.md b/.github/ISSUE_TEMPLATE/AutoGenerateMarkdown.yml similarity index 100% rename from .github/ISSUE_TEMPLATE/AutoGenerateMarkdown.md rename to .github/ISSUE_TEMPLATE/AutoGenerateMarkdown.yml From 1d0f22d84e93fe82c0cbccc97d95c7c8f8f5f520 Mon Sep 17 00:00:00 2001 From: luojiyin Date: Thu, 8 Aug 2024 22:36:58 +0800 Subject: [PATCH 03/14] markdown to yml --- .../ISSUE_TEMPLATE/AutoGenerateMarkdown.yml | 31 ++++++++++++++----- 1 file changed, 23 insertions(+), 8 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/AutoGenerateMarkdown.yml b/.github/ISSUE_TEMPLATE/AutoGenerateMarkdown.yml index 2a9b076ad..d4af10df2 100644 --- a/.github/ISSUE_TEMPLATE/AutoGenerateMarkdown.yml +++ b/.github/ISSUE_TEMPLATE/AutoGenerateMarkdown.yml @@ -1,9 +1,24 @@ ---- name: 翻译任务(自动爬取) -about: "新增待翻译文章,使用自动 GitHub Actions 自动爬取。" -title: "[Auto](此处替换为翻译的中文标题)" -labels: Translation-needed -assignees: '' ---- - -[原文标题](https://example.com/path/to/your/article/) +description: '新增待翻译文章,使用自动 GitHub Actions 自动爬取。' +title: '[Auto](此处替换为翻译的中文标题)' +labels: + - Article + - Translation +body: + - type: input + id: page_link + attributes: + label: 文章网址 + description: 一个 issue 只能填一个 + validations: + required: true + - type: textarea + attributes: + label: 翻译须知 + description: 如有其它需要注意的事项,请注明以帮助译者。 + value: '@kaiyuanshe/team' + - type: markdown + attributes: + value: >- + This template was generated with [Issue Forms + Creator](https://issue-forms-creator.netlify.app) From 75e50e8062ffd1746e8c564588eebe7b82642da4 Mon Sep 17 00:00:00 2001 From: luojiyin1987 Date: Thu, 8 Aug 2024 14:38:09 +0000 Subject: [PATCH 04/14] Auto Format --- chinese/articles/coding-bootcamp-handbook.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chinese/articles/coding-bootcamp-handbook.md b/chinese/articles/coding-bootcamp-handbook.md index 0e0d6630f..170d1d362 100644 --- a/chinese/articles/coding-bootcamp-handbook.md +++ b/chinese/articles/coding-bootcamp-handbook.md @@ -389,7 +389,7 @@ Surprisingly, there are a few bootcamps that are for-profit but still free. And 要了解参加编码训练营的真实成本,你应该考虑机会成本。 -**例子**:你现在每个月赚$3000美元。你搬到旧金山,在那$2,000 美元只能租到一个卧室。你参加 12 周的训练营费用是\$15,00 0美元。 +**例子**:你现在每个月赚$3000美元。你搬到旧金山,在那$2,000 美元只能租到一个卧室。你参加 12 周的训练营费用是\$15,00 0美元。 这是你的真实成本,假设加上你在 6 个月的时间内找到工作并领取第一份薪水: From ba8e25d92875c57530826ea6b5d6d2f84c5a04cc Mon Sep 17 00:00:00 2001 From: luojiyin Date: Thu, 8 Aug 2024 22:43:48 +0800 Subject: [PATCH 05/14] update action --- .github/workflows/WebPageToMarkdown.yml | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/.github/workflows/WebPageToMarkdown.yml b/.github/workflows/WebPageToMarkdown.yml index 2d0f4ff30..335c7e1fc 100644 --- a/.github/workflows/WebPageToMarkdown.yml +++ b/.github/workflows/WebPageToMarkdown.yml @@ -19,13 +19,18 @@ jobs: shell: bash run: echo "The description of the issue is empty." 1>&2; exit 1; - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 + + - id: issue-parser + uses: stefanbuck/github-issue-parser@v3 + with: + template-path: ".github/ISSUE_TEMPLATE/AutoGenerateMarkdown.yml" + - name: Crawl pages and generate Markdown files - uses: freeCodeCamp-China/article-webpage-to-markdown-action@v1 + uses: freeCodeCamp-China/article-webpage-to-markdown-action@v2 with: - newsLink: '${{ github.event.issue.Body }}' - ignoreSelector: '.ad-wrapper' - markDownFilePath: './chinese/articles/' + pageURL: "${{ steps.issue-parser.outputs.issueparser_page_link }}" + markdownFolder: './chinese/articles/' githubToken: ${{ github.token }} - name: Git Auto Commit From 6e4a39c8eccc85fbcdfb6ef1ea9ff89ce9f9f236 Mon Sep 17 00:00:00 2001 From: luojiyin1987 Date: Thu, 8 Aug 2024 14:49:28 +0000 Subject: [PATCH 06/14] Auto Format --- chinese/articles/coding-bootcamp-handbook.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chinese/articles/coding-bootcamp-handbook.md b/chinese/articles/coding-bootcamp-handbook.md index 170d1d362..0fb751251 100644 --- a/chinese/articles/coding-bootcamp-handbook.md +++ b/chinese/articles/coding-bootcamp-handbook.md @@ -389,7 +389,7 @@ Surprisingly, there are a few bootcamps that are for-profit but still free. And 要了解参加编码训练营的真实成本,你应该考虑机会成本。 -**例子**:你现在每个月赚$3000美元。你搬到旧金山,在那$2,000 美元只能租到一个卧室。你参加 12 周的训练营费用是\$15,00 0美元。 +**例子**:你现在每个月赚$3000美元。你搬到旧金山,在那$2,000 美元只能租到一个卧室。你参加 12 周的训练营费用是\$15,00 0美元。 这是你的真实成本,假设加上你在 6 个月的时间内找到工作并领取第一份薪水: From d4ee39f7c2b2f8f754bce9b96b1027e3d7338d24 Mon Sep 17 00:00:00 2001 From: luojiyin Date: Thu, 8 Aug 2024 23:44:45 +0800 Subject: [PATCH 07/14] fix from review --- .github/ISSUE_TEMPLATE/AutoGenerateMarkdown.yml | 3 +-- .github/workflows/WebPageToMarkdown.yml | 1 + 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/AutoGenerateMarkdown.yml b/.github/ISSUE_TEMPLATE/AutoGenerateMarkdown.yml index d4af10df2..a6498881a 100644 --- a/.github/ISSUE_TEMPLATE/AutoGenerateMarkdown.yml +++ b/.github/ISSUE_TEMPLATE/AutoGenerateMarkdown.yml @@ -2,8 +2,7 @@ name: 翻译任务(自动爬取) description: '新增待翻译文章,使用自动 GitHub Actions 自动爬取。' title: '[Auto](此处替换为翻译的中文标题)' labels: - - Article - - Translation + - Translation-needed body: - type: input id: page_link diff --git a/.github/workflows/WebPageToMarkdown.yml b/.github/workflows/WebPageToMarkdown.yml index 335c7e1fc..55a4d6304 100644 --- a/.github/workflows/WebPageToMarkdown.yml +++ b/.github/workflows/WebPageToMarkdown.yml @@ -30,6 +30,7 @@ jobs: uses: freeCodeCamp-China/article-webpage-to-markdown-action@v2 with: pageURL: "${{ steps.issue-parser.outputs.issueparser_page_link }}" + excludedSelector: '.ad-wrapper' markdownFolder: './chinese/articles/' githubToken: ${{ github.token }} From 4bde8e48449f2fce36f6ad27b787fa69e18d003e Mon Sep 17 00:00:00 2001 From: luojiyin1987 Date: Thu, 8 Aug 2024 15:45:56 +0000 Subject: [PATCH 08/14] Auto Format --- chinese/articles/coding-bootcamp-handbook.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chinese/articles/coding-bootcamp-handbook.md b/chinese/articles/coding-bootcamp-handbook.md index 0fb751251..08c4a6252 100644 --- a/chinese/articles/coding-bootcamp-handbook.md +++ b/chinese/articles/coding-bootcamp-handbook.md @@ -389,7 +389,7 @@ Surprisingly, there are a few bootcamps that are for-profit but still free. And 要了解参加编码训练营的真实成本,你应该考虑机会成本。 -**例子**:你现在每个月赚$3000美元。你搬到旧金山,在那$2,000 美元只能租到一个卧室。你参加 12 周的训练营费用是\$15,00 0美元。 +**例子**:你现在每个月赚$3000美元。你搬到旧金山,在那$2,000 美元只能租到一个卧室。你参加 12 周的训练营费用是\$15,00 0美元。 这是你的真实成本,假设加上你在 6 个月的时间内找到工作并领取第一份薪水: From 61e6cd78553e2310c19d08f01516954c4db0ec56 Mon Sep 17 00:00:00 2001 From: luojiyin Date: Thu, 8 Aug 2024 23:51:06 +0800 Subject: [PATCH 09/14] fix format --- chinese/articles/coding-bootcamp-handbook.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chinese/articles/coding-bootcamp-handbook.md b/chinese/articles/coding-bootcamp-handbook.md index 08c4a6252..e7ed0a335 100644 --- a/chinese/articles/coding-bootcamp-handbook.md +++ b/chinese/articles/coding-bootcamp-handbook.md @@ -389,7 +389,7 @@ Surprisingly, there are a few bootcamps that are for-profit but still free. And 要了解参加编码训练营的真实成本,你应该考虑机会成本。 -**例子**:你现在每个月赚$3000美元。你搬到旧金山,在那$2,000 美元只能租到一个卧室。你参加 12 周的训练营费用是\$15,00 0美元。 +**例子**:你现在每个月赚$3000美元。你搬到旧金山,在那$2,000 美元只能租到一个卧室。你参加 12 周的训练营费用是 $15,000美元。 这是你的真实成本,假设加上你在 6 个月的时间内找到工作并领取第一份薪水: From d4e795d695d5835d47804ef477339dfe39089536 Mon Sep 17 00:00:00 2001 From: luojiyin1987 Date: Thu, 8 Aug 2024 15:52:13 +0000 Subject: [PATCH 10/14] Auto Format --- chinese/articles/coding-bootcamp-handbook.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chinese/articles/coding-bootcamp-handbook.md b/chinese/articles/coding-bootcamp-handbook.md index e7ed0a335..f7fe14024 100644 --- a/chinese/articles/coding-bootcamp-handbook.md +++ b/chinese/articles/coding-bootcamp-handbook.md @@ -389,7 +389,7 @@ Surprisingly, there are a few bootcamps that are for-profit but still free. And 要了解参加编码训练营的真实成本,你应该考虑机会成本。 -**例子**:你现在每个月赚$3000美元。你搬到旧金山,在那$2,000 美元只能租到一个卧室。你参加 12 周的训练营费用是 $15,000美元。 +**例子**:你现在每个月赚$3000美元。你搬到旧金山,在那$2,000 美元只能租到一个卧室。你参加 12 周的训练营费用是 $15,000 美元。 这是你的真实成本,假设加上你在 6 个月的时间内找到工作并领取第一份薪水: From bd835293219813cd3a1f021978b9e85049f6c0b7 Mon Sep 17 00:00:00 2001 From: luojiyin Date: Thu, 8 Aug 2024 23:58:52 +0800 Subject: [PATCH 11/14] trigger action limit --- .github/workflows/WebPageToMarkdown.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/WebPageToMarkdown.yml b/.github/workflows/WebPageToMarkdown.yml index 55a4d6304..fed3b545b 100644 --- a/.github/workflows/WebPageToMarkdown.yml +++ b/.github/workflows/WebPageToMarkdown.yml @@ -1,8 +1,9 @@ name: Web page to Markdown on: - issues: - types: - - opened + pull_request: + paths: + - 'chinese/articles/**' + jobs: WebPageToMarkdown: runs-on: ubuntu-latest From cd49f58f11abd528240b57ef0174d5667f9ef6a9 Mon Sep 17 00:00:00 2001 From: luojiyin Date: Thu, 8 Aug 2024 23:59:43 +0800 Subject: [PATCH 12/14] trigger action limit --- .github/workflows/WebPageToMarkdown.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/WebPageToMarkdown.yml b/.github/workflows/WebPageToMarkdown.yml index fed3b545b..ac7536a50 100644 --- a/.github/workflows/WebPageToMarkdown.yml +++ b/.github/workflows/WebPageToMarkdown.yml @@ -1,9 +1,9 @@ name: Web page to Markdown on: - pull_request: + push: paths: - 'chinese/articles/**' - + jobs: WebPageToMarkdown: runs-on: ubuntu-latest From f19f46d3b96fb2768ad30e8273185255daf24524 Mon Sep 17 00:00:00 2001 From: luojiyin Date: Fri, 9 Aug 2024 00:01:39 +0800 Subject: [PATCH 13/14] fix --- .github/workflows/WebPageToMarkdown.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/WebPageToMarkdown.yml b/.github/workflows/WebPageToMarkdown.yml index ac7536a50..22784da87 100644 --- a/.github/workflows/WebPageToMarkdown.yml +++ b/.github/workflows/WebPageToMarkdown.yml @@ -1,8 +1,8 @@ name: Web page to Markdown on: - push: - paths: - - 'chinese/articles/**' + issues: + types: + - opened jobs: WebPageToMarkdown: From 7175cb32c3ab0659a8ef5035c3fb0c3b60e6ce9e Mon Sep 17 00:00:00 2001 From: luojiyin Date: Fri, 9 Aug 2024 00:06:11 +0800 Subject: [PATCH 14/14] limit trigger format action --- .github/workflows/main.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 957776dc6..fbf953b99 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -2,6 +2,8 @@ name: CI & CD on: push: + paths: + - 'chinese/articles/**' jobs: Lint-and-Format: