chore fix eslint warnings #2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This workflow checks that the `dist/` directory is up-to-date with the source | |
name: Check Transpiled JavaScript | |
on: | |
push: | |
branches: | |
- main | |
permissions: | |
contents: read | |
jobs: | |
check-dist: | |
name: Check dist/ | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Set node version | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
cache: yarn | |
- name: Build dist/ Directory | |
id: build | |
run: | | |
yarn install | |
yarn build | |
# This will fail the workflow if the `dist/` directory is different from | |
# expected. | |
- name: Compare Directories | |
id: diff | |
run: | | |
if [ "$(git diff --ignore-space-at-eol --text dist/ | wc -l)" -gt "0" ]; then | |
echo "Detected uncommitted changes after build. See status below:" | |
git diff --ignore-space-at-eol --text dist/ | |
exit 1 | |
fi |