37 lines
1.2 KiB
YAML
37 lines
1.2 KiB
YAML
name: Continuous Integration
|
||
|
||
on:
|
||
pull_request:
|
||
branches: [ master ]
|
||
|
||
jobs:
|
||
markdown-lint:
|
||
runs-on: ubuntu-latest
|
||
steps:
|
||
- uses: actions/checkout@v2
|
||
- uses: actions/setup-node@v2
|
||
with:
|
||
node-version: '16'
|
||
cache: 'npm'
|
||
- name: Install packages
|
||
run: sudo gem install mdl
|
||
- name: Lint markdown files
|
||
run: mdl . -r ~MD036,~MD024,~MD004,~MD029
|
||
- run: pip install -r requirements.txt
|
||
- run: mkdocs build --strict
|
||
- run: npm install
|
||
- run: node .github/manual_lint.js
|
||
- 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 }}
|
||
# Suppress 036 Emphasis used instead of a header
|
||
# Suppress 024 Multiple headers with the same content
|