-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* build and check dist folder * test that it works * Revert "test that it works" This reverts commit 86fa96f.
- Loading branch information
1 parent
90b2aaf
commit d5a7585
Showing
1 changed file
with
33 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
name: build | ||
|
||
on: [push, pull_request, workflow_dispatch] | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-20.04 | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Setup Node 16 | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: '16' | ||
cache: 'yarn' | ||
|
||
- name: Install dependencies | ||
run: yarn install --immutable --immutable-cache --check-cache | ||
|
||
- name: Run linter checks | ||
run: yarn lint | ||
|
||
- name: Rebuild the dist/ directory | ||
run: yarn build | ||
|
||
- name: Compare the expected and actual dist/ directories | ||
run: | | ||
if [ "$(git diff --ignore-space-at-eol dist/ | wc -l)" -gt "0" ]; then | ||
echo "The dist/ directory is out of date. Please run 'yarn build' and commit the changes." | ||
echo "See status below:" | ||
git diff | ||
exit 1 | ||
fi |