Bump the npm-development group across 1 directory with 8 updates #106
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
name: Check build | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
permissions: | |
contents: read | |
jobs: | |
check-dist: | |
name: Check Build | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
id: checkout | |
uses: actions/checkout@v4 | |
- name: Setup Node.js | |
id: setup-node | |
uses: actions/setup-node@v4 | |
with: | |
node-version-file: package.json | |
cache: npm | |
- name: Install Dependencies | |
id: npm-ci | |
run: npm ci | |
- name: Build dist/ Directory | |
id: build | |
run: npm run bundle | |
# This will fail the workflow if the PR wasn't created by Dependabot. | |
- name: Compare Directories | |
id: diff | |
run: | | |
if [ "$(git diff --ignore-space-at-eol --text dist/ | wc -l)" -gt "0" ]; then | |
echo "Detected changes after build. Run 'npm run bundle' before pushing.." | |
git diff --ignore-space-at-eol --text dist/ | |
exit 1 | |
fi |