diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 0644b1eec..0f4aca1f2 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -3,21 +3,37 @@ name: Lint on: [push, pull_request] jobs: - build: + lint: runs-on: ubuntu-latest steps: - - - uses: actions/checkout@v2 - - - uses: actions/setup-node@v1 - with: - node-version: 10.x - - - uses: bahmutov/npm-install@v1 - - - name: Pre-generate docs - run: yarn run pregenerate - - - name: Run linter - run: yarn run lint + - uses: actions/checkout@v2 + + - uses: actions/setup-node@v1 + with: + node-version: 10.x + + - name: npm load cache + uses: actions/cache@v2 + with: + path: '**/node_modules' + key: ${{ runner.os }}-actions-npm-${{ github.sha }} + restore-keys: | + ${{ runner.os }}-actions-npm- + + - run: npm install + + - name: Pre-generate docs + run: yarn run pregenerate + + - name: Run linter + run: yarn run lint + + - name: Check for modified files + run: | + if [[ `git status --porcelain --untracked-files=no` ]]; then + echo "Tracked files were modified by 'yarn run pregenerate'" + exit 1 + else + exit 0 + fi diff --git a/docs/rstIconReplacements.txt b/docs/rstIconReplacements.txt index 3b8dc114f..ba76590d3 100644 --- a/docs/rstIconReplacements.txt +++ b/docs/rstIconReplacements.txt @@ -11,7 +11,7 @@ .. |chevronUp| replace:: :raw-html:`` .. |classes| replace:: :raw-html:`` .. |clear| replace:: :raw-html:`` -.. |clipboard| replace:: :raw-html:`` +.. |clipboard| replace:: :raw-html:`` .. |close| replace:: :raw-html:`` .. |coachContent| replace:: :raw-html:`` .. |coach| replace:: :raw-html:``