diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index e67363c..eef6ab7 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -1,8 +1,9 @@ name: Build on: - - push - - pull_request + push: + branches: + - "main" jobs: build: @@ -15,5 +16,5 @@ jobs: node-version: 20.x cache: "npm" - run: npm ci - - run: npm run build --if-present + - run: npm run build - run: npm test diff --git a/.github/workflows/pr.yaml b/.github/workflows/pr.yaml new file mode 100644 index 0000000..332cebe --- /dev/null +++ b/.github/workflows/pr.yaml @@ -0,0 +1,18 @@ +name: Build + +on: + - pull_request + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - name: Setup Node.js + uses: actions/setup-node@v3 + with: + node-version: 20.x + cache: "npm" + - run: npm ci + - run: npm run build + - run: npm test