Lint before npm install.

This commit is contained in:
Anduin Xue 2022-03-05 01:20:47 +08:00
parent 1c89e6dfbb
commit d662d8e293

View File

@ -9,7 +9,7 @@ jobs:
Rebuild-everything: Rebuild-everything:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
# Preparation. # Checkout, install tools..
- uses: actions/checkout@v2 - uses: actions/checkout@v2
with: with:
token: ${{ secrets.PAT }} token: ${{ secrets.PAT }}
@ -19,16 +19,17 @@ jobs:
cache: 'npm' cache: 'npm'
- name: Install packages - name: Install packages
run: sudo gem install mdl run: sudo gem install mdl
- run: npm install # Lint issues first. (Without node_modules)
# Lint issues first.
- name: Lint markdown files - name: Lint markdown files
run: mdl . -r ~MD036,~MD024,~MD004,~MD029 run: mdl . -r ~MD036,~MD024,~MD004,~MD029
- run: pip install -r requirements.txt - run: pip install -r requirements.txt
- run: mkdocs build --strict - run: mkdocs build --strict
# Generate Readme. # Generate Readme, mkdocs.
- run: node ./.github/readme-generate.js - run: node ./.github/readme-generate.js
# Do textlint fix. # Do textlint fix.
- run: npm install
- run: ./node_modules/.bin/textlint . --fix - run: ./node_modules/.bin/textlint . --fix
- run: rm ./node_modules -rvf
# Save files. # Save files.
- uses: stefanzweifel/git-auto-commit-action@v4 - uses: stefanzweifel/git-auto-commit-action@v4
with: with:
@ -39,7 +40,6 @@ jobs:
commit_user_email: github-actions[bot]@users.noreply.github.com commit_user_email: github-actions[bot]@users.noreply.github.com
commit_author: github-actions[bot] <github-actions[bot]@users.noreply.github.com> commit_author: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
# Build docs # Build docs
- run: rm ./node_modules -rvf
- run: echo cook.aiurs.co > CNAME - run: echo cook.aiurs.co > CNAME
- run: mkdir docs && echo cook.aiurs.co > docs/CNAME - run: mkdir docs && echo cook.aiurs.co > docs/CNAME
- uses: mhausenblas/mkdocs-deploy-gh-pages@master - uses: mhausenblas/mkdocs-deploy-gh-pages@master