From d662d8e2930f08a7740986469c3a02a1aef53e98 Mon Sep 17 00:00:00 2001 From: Anduin Xue Date: Sat, 5 Mar 2022 01:20:47 +0800 Subject: [PATCH] Lint before npm install. --- .github/workflows/build.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index c0498c1..2c541dd 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -9,7 +9,7 @@ jobs: Rebuild-everything: runs-on: ubuntu-latest steps: - # Preparation. + # Checkout, install tools.. - uses: actions/checkout@v2 with: token: ${{ secrets.PAT }} @@ -19,16 +19,17 @@ jobs: cache: 'npm' - name: Install packages run: sudo gem install mdl - - run: npm install - # Lint issues first. + # Lint issues first. (Without node_modules) - name: Lint markdown files run: mdl . -r ~MD036,~MD024,~MD004,~MD029 - run: pip install -r requirements.txt - run: mkdocs build --strict - # Generate Readme. + # Generate Readme, mkdocs. - run: node ./.github/readme-generate.js # Do textlint fix. + - run: npm install - run: ./node_modules/.bin/textlint . --fix + - run: rm ./node_modules -rvf # Save files. - uses: stefanzweifel/git-auto-commit-action@v4 with: @@ -39,7 +40,6 @@ jobs: commit_user_email: github-actions[bot]@users.noreply.github.com commit_author: github-actions[bot] # Build docs - - run: rm ./node_modules -rvf - run: echo cook.aiurs.co > CNAME - run: mkdir docs && echo cook.aiurs.co > docs/CNAME - uses: mhausenblas/mkdocs-deploy-gh-pages@master