From 8a9c62e63487c783be0cbd90bbf6cc3dce86bf88 Mon Sep 17 00:00:00 2001 From: Marcin Rataj Date: Mon, 27 Jul 2020 21:57:30 +0200 Subject: [PATCH] Create build.yml This adds GithubAction that runs the build and checks for any unstaged changes. This ensures `src/dir-index.html` match the output `dir-index.html` in the main directory. --- .github/workflows/build.yml | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 .github/workflows/build.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..a9ee3ce --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,22 @@ +name: Build +on: + push: + +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' + - run: npm run build + - 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 + run: git status && echo "Output does not match src/, uncommitted changes exist, follow build instructions from README" && exit 1 -- GitLab