Skip to content
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

check for modified files #138

Merged
merged 4 commits into from
Dec 1, 2020
Merged
Show file tree
Hide file tree
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
46 changes: 31 additions & 15 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Comment on lines +32 to +39
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is the new step that checks for files modified by pregenerate

2 changes: 1 addition & 1 deletion docs/rstIconReplacements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
.. |chevronUp| replace:: :raw-html:`<span class="design-system-icon"><svg viewBox="0 0 24 24" role="presentation" focusable="false" xmlns="http://www.w3.org/2000/svg" width="24" height="24"><path d="M12 8l-6 6 1.41 1.41L12 10.83l4.59 4.58L18 14z"/></svg></span>`
.. |classes| replace:: :raw-html:`<span class="design-system-icon"><svg role="presentation" focusable="false" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M21.13 4H4.87a.87.87 0 00-.87.87V10h2V6h14v11h-1v2h2.13a.87.87 0 00.87-.87V4.87a.87.87 0 00-.87-.87zM8 14a2 2 0 112 2 2 2 0 01-2-2zm6 4.51V20H6v-1.49c0-1.34 2.67-2 4-2s4 .66 4 2zm0-3.35a6.36 6.36 0 00-.92.08 1.77 1.77 0 01-.23.48c1.32.49 2.48 1.37 2.48 2.79V19H18v-1.84c0-1.32-2.67-2-4-2zm0-4.49a2 2 0 00-1.68.93 3.34 3.34 0 011 2.4 3 3 0 010 .53 1.7 1.7 0 00.71.14 2 2 0 000-4zm-6.32.93A2 2 0 004 12.67a2 2 0 002 2 1.7 1.7 0 00.71-.14 3 3 0 010-.53 3.34 3.34 0 01.97-2.4zm-.76 3.64a6.36 6.36 0 00-.92-.08c-1.33 0-4 .68-4 2V19h2.67v-.49c0-1.42 1.16-2.3 2.48-2.79a1.77 1.77 0 01-.23-.48z"/></svg></span>`
.. |clear| replace:: :raw-html:`<span class="design-system-icon"><svg viewBox="0 0 24 24" role="presentation" focusable="false" xmlns="http://www.w3.org/2000/svg" width="24" height="24"><path d="M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"/></svg></span>`
.. |clipboard| replace:: :raw-html:`<span class="design-system-icon"><svg viewBox="0 0 24 24" role="presentation" focusable="false" width="24" height="24" xmlns="http://www.w3.org/2000/svg"><path d="M19 2h-4.18C14.4.84 13.3 0 12 0c-1.3 0-2.4.84-2.82 2H5c-1.1 0-2 .9-2 2v16c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zm-7 0c.55 0 1 .45 1 1s-.45 1-1 1-1-.45-1-1 .45-1 1-1z"/></svg></span>`
.. |clipboard| replace:: :raw-html:`<span class="design-system-icon"><svg viewBox="0 0 24 24" role="presentation" focusable="false" width="24" height="24" xmlns="http://www.w3.org/2000/svg"><path d="M19 2h-4.18C14.4.84 13.3 0 12 0c-1.3 0-2.4.84-2.82 2H5c-1.1 0-2 .9-2 2v16c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zm-7 0c.55 0 1 .45 1 1s-.45 1-1 1-1-.45-1-1 .45-1 1-1zm7 18H5V4h2v3h10V4h2v16z"/></svg></span>`
.. |close| replace:: :raw-html:`<span class="design-system-icon"><svg viewBox="0 0 24 24" role="presentation" focusable="false" xmlns="http://www.w3.org/2000/svg" width="24" height="24"><path d="M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"/></svg></span>`
.. |coachContent| replace:: :raw-html:`<span class="design-system-icon design-system-icon-color-coachContent"><svg viewBox="0 0 24 24" role="presentation" focusable="false" xmlns="http://www.w3.org/2000/svg" width="24" height="24"><path d="M12 11.55C9.64 9.35 6.48 8 3 8v11c3.48 0 6.64 1.35 9 3.55 2.36-2.19 5.52-3.55 9-3.55V8c-3.48 0-6.64 1.35-9 3.55zM12 8c1.66 0 3-1.34 3-3s-1.34-3-3-3-3 1.34-3 3 1.34 3 3 3z"/></svg></span>`
.. |coach| replace:: :raw-html:`<span class="design-system-icon"><svg viewBox="0 0 24 24" role="presentation" focusable="false" xmlns="http://www.w3.org/2000/svg" width="24" height="24"><path d="M12 11.55C9.64 9.35 6.48 8 3 8v11c3.48 0 6.64 1.35 9 3.55 2.36-2.19 5.52-3.55 9-3.55V8c-3.48 0-6.64 1.35-9 3.55zM12 8c1.66 0 3-1.34 3-3s-1.34-3-3-3-3 1.34-3 3 1.34 3 3 3z"/></svg></span>`
Expand Down