diff --git a/.github/workflows/build-chack.yml b/.github/workflows/build-chack.yml new file mode 100644 index 00000000..7183d979 --- /dev/null +++ b/.github/workflows/build-chack.yml @@ -0,0 +1,36 @@ +name: Build Check + +on: [push, pull_request] + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v2 + + - name: Set up Node.js + uses: actions/setup-node@v2 + with: + node-version: '14' + + - name: Install dependencies + run: npm install --include=dev + + - name: Install dependencies + run: npm i --save-dev @types/jest + + + - name: Set NODE_ENV to production + run: echo "NODE_ENV=production" >> $GITHUB_ENV + + - name: Build + run: npm run build + + - name: Check for build success + run: | + if [ $? -ne 0 ]; then + echo "Error: 'npm run build' failed" + exit 1 + fi