summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Drew Powers <1369770+drwpow@users.noreply.github.com> 2021-04-21 10:55:49 -0600
committerGravatar GitHub <noreply@github.com> 2021-04-21 10:55:49 -0600
commit78fe1cbaf4ccb6be3a265585ff4b105df77b3cc2 (patch)
treece771332159a16780db20eea64f401bbb67f38cc
parent54409a0702e4fe41e44420db9c603124207ecb20 (diff)
downloadastro-78fe1cbaf4ccb6be3a265585ff4b105df77b3cc2.tar.gz
astro-78fe1cbaf4ccb6be3a265585ff4b105df77b3cc2.tar.zst
astro-78fe1cbaf4ccb6be3a265585ff4b105df77b3cc2.zip
Only run CI on pull requests and merges, not every commit (#119)
-rw-r--r--.github/workflows/nodejs.yml26
1 files changed, 23 insertions, 3 deletions
diff --git a/.github/workflows/nodejs.yml b/.github/workflows/nodejs.yml
index 9716d157f..6be61ce16 100644
--- a/.github/workflows/nodejs.yml
+++ b/.github/workflows/nodejs.yml
@@ -1,15 +1,35 @@
name: Node CI
-on: [push]
+on:
+ push:
+ branches:
+ - main
+ pull_request:
+ branches:
+ - main
jobs:
+ skip_test:
+ continue-on-error: true
+ runs-on: ubuntu-latest
+ outputs:
+ should_skip: ${{ steps.skip_check.outputs.should_skip }}
+ steps:
+ - id: skip_check
+ uses: fkirc/skip-duplicate-actions@master
+ with:
+ # All of these options are optional, so you can remove them if you are happy with the defaults
+ concurrent_skipping: 'never'
+ skip_after_successful_duplicate: 'true'
+ paths_ignore: '["**/README.md", "**/docs/**"]'
+ do_not_skip: '["pull_request", "workflow_dispatch", "schedule"]'
test:
+ needs: skip_test # allow skip_test to cancel this job if it’s not needed
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
node-version: [14.x, 15.x]
-
steps:
- uses: actions/checkout@v1
- name: Use Node.js ${{ matrix.node-version }}
@@ -27,7 +47,7 @@ jobs:
cd prettier-plugin-astro
npm ci
-
+
cd ../examples/kitchen-sink
npm ci
npm run build