Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit ceb57db

Browse files
ci: #1 lint markdown and filename
1 parent d2772d1 commit ceb57db

File tree

2 files changed

+40
-0
lines changed

2 files changed

+40
-0
lines changed

‎.github/workflows/ci.yml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: CI
2+
on:
3+
pull_request:
4+
branches:
5+
- master
6+
7+
jobs:
8+
build:
9+
name: Build
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: Setup Node
13+
uses: actions/setup-node@v2
14+
with:
15+
node-version: '14'
16+
17+
- name: Checkout
18+
uses: actions/checkout@v2
19+
20+
# @coding-operation/public-component-web is a private package.
21+
# remove all packages, or install would fail.
22+
- name: Prepare
23+
run: |
24+
rm package.json yarn.lock
25+
yarn add lint-md-cli remark-cli remark-preset-lint-recommended fnlint
26+
27+
- name: Get Diff Action
28+
uses: technote-space/get-diff-action@v4.0.1
29+
with:
30+
PATTERNS: |
31+
source/**/*.md
32+
*.md
33+
34+
- name: Lint
35+
if: env.GIT_DIFF
36+
run: |
37+
yarn remark -f ${{ env.GIT_DIFF }}
38+
yarn lint-md ${{ env.GIT_DIFF }}
39+
yarn fnlint -c .fnlint.json

‎README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# CODING 帮助中心
22

3+
[![CI](https://github.com/Coding/coding-docs/actions/workflows/ci.yml/badge.svg)](https://github.com/Coding/coding-docs/actions/workflows/ci.yml)
34
[![Commitizen friendly](https://img.shields.io/badge/commitizen-friendly-brightgreen.svg)](http://commitizen.github.io/cz-cli/)
45

56
本仓库是 CODING 帮助中心的文档,采用 Hexo 框架,Markdown 格式,通过持续集成强制检查下列规范:

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /