Skip to content
This repository has been archived by the owner on Oct 14, 2024. It is now read-only.

[optimize] update Auto Tranlation infrastructure #1260

Merged
9 changes: 0 additions & 9 deletions .github/ISSUE_TEMPLATE/AutoGenerateMarkdown.md

This file was deleted.

23 changes: 23 additions & 0 deletions .github/ISSUE_TEMPLATE/AutoGenerateMarkdown.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: 翻译任务(自动爬取)
description: '新增待翻译文章,使用自动 GitHub Actions 自动爬取。'
title: '[Auto](此处替换为翻译的中文标题)'
labels:
- Translation-needed
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)
17 changes: 12 additions & 5 deletions .github/workflows/WebPageToMarkdown.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ on:
issues:
types:
- opened

jobs:
WebPageToMarkdown:
runs-on: ubuntu-latest
Expand All @@ -19,13 +20,19 @@ 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'
luojiyin1987 marked this conversation as resolved.
Show resolved Hide resolved
markDownFilePath: './chinese/articles/'
pageURL: "${{ steps.issue-parser.outputs.issueparser_page_link }}"
excludedSelector: '.ad-wrapper'
markdownFolder: './chinese/articles/'
githubToken: ${{ github.token }}

- name: Git Auto Commit
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ name: CI & CD

on:
push:
paths:
- 'chinese/articles/**'

jobs:
Lint-and-Format:
Expand Down
2 changes: 1 addition & 1 deletion chinese/articles/coding-bootcamp-handbook.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 个月的时间内找到工作并领取第一份薪水:

Expand Down