build.yml 673 Bytes
Newer Older
Marcin Rataj's avatar
Marcin Rataj committed
1
name: Build
Marcin Rataj's avatar
Marcin Rataj committed
2
on: [push, pull_request]
Marcin Rataj's avatar
Marcin Rataj committed
3 4 5 6 7 8 9 10 11 12 13 14

jobs:
  no-uncommitted-changes:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v2
      with:
        ref: ${{ github.head_ref }}
    - name: Run Build
      uses: actions/setup-node@v1
      with:
        node-version: '12.x'
15
    - run: npm run build
Marcin Rataj's avatar
Marcin Rataj committed
16 17 18 19 20
    - name: Check working tree
      id: changes
      uses: UnicornGlobal/has-changes-action@v1.0.11
    - name: Check for uncommited changes
      if: steps.changes.outputs.changed == 1
21
      run: git status && git --no-pager diff --patch-with-raw && echo "Output does not match src/, uncommitted changes exist, follow build instructions from README" && exit 1