Skip to content

Commit

Permalink
add GitHub actions workflow (#16)
Browse files Browse the repository at this point in the history
* build and check dist folder

* test that it works

* Revert "test that it works"

This reverts commit 86fa96f.
  • Loading branch information
incognitojam authored Nov 1, 2022
1 parent 90b2aaf commit d5a7585
Showing 1 changed file with 33 additions and 0 deletions.
33 changes: 33 additions & 0 deletions .github/workflows/build.yaml
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

0 comments on commit d5a7585

Please sign in to comment.