HowToCook/.github/workflows/ci.yml

37 lines
1.2 KiB
YAML
Raw Normal View History

2022-03-04 16:03:12 +00:00
name: Continuous Integration
2022-01-04 03:24:15 +00:00
on:
pull_request:
2022-03-04 15:58:29 +00:00
branches: [ master ]
2022-01-04 03:24:15 +00:00
jobs:
2022-03-04 16:06:56 +00:00
markdown-lint:
2022-01-04 03:24:15 +00:00
runs-on: ubuntu-latest
steps:
2022-03-12 06:36:27 +00:00
- uses: actions/checkout@v2
2022-03-12 06:34:23 +00:00
- uses: actions/setup-node@v2
with:
node-version: '16'
cache: 'npm'
2022-01-04 03:24:15 +00:00
- name: Install packages
run: sudo gem install mdl
- name: Lint markdown files
2022-03-03 16:53:24 +00:00
run: mdl . -r ~MD036,~MD024,~MD004,~MD029
2022-03-04 16:52:54 +00:00
- run: pip install -r requirements.txt
- run: mkdocs build --strict
2022-03-12 06:38:20 +00:00
- run: npm install
2022-03-12 06:34:23 +00:00
- run: node .github/manual_lint.js
2022-03-20 19:04:57 +00:00
- name: Comment
uses: thollander/actions-comment-pull-request@v1
with:
message: '自动化内容检查通过。 请 @Anduin2017 尽快合并此 Pull Request**'
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Comment
if: failure()
uses: thollander/actions-comment-pull-request@v1
with:
message: '**不能**合并此 Pull Request因为它未能通过自动化检查请**确保**内容符合规范!'
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2022-03-03 16:36:07 +00:00
# Suppress 036 Emphasis used instead of a header
# Suppress 024 Multiple headers with the same content