Skip to content

ci: #1 lint #2

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jan 2, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 39 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: CI
on:
pull_request:
branches:
- master

jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- name: Setup Node
uses: actions/setup-node@v2
with:
node-version: '14'

- name: Checkout
uses: actions/checkout@v2

# @coding-operation/public-component-web is a private package.
# remove all packages, or install would fail.
- name: Prepare
run: |
rm package.json yarn.lock
yarn add lint-md-cli remark-cli remark-preset-lint-recommended fnlint

- name: Get Diff Action
uses: technote-space/get-diff-action@v4.0.1
with:
PATTERNS: |
source/**/*.md
*.md

- name: Lint
if: env.GIT_DIFF
run: |
yarn remark -f ${{ env.GIT_DIFF }}
yarn lint-md ${{ env.GIT_DIFF }}
yarn fnlint -c .fnlint.json
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# CODING 帮助中心

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

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