Make CI only run once on pull requests #47
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: continuous-integration | |
on: | |
push: | |
branches-ignore: | |
- '**/pull/**' # Ignores branches that are created for pull requests | |
pull_request: | |
branches: | |
- '**' # Runs for pull requests targeting any branch | |
jobs: | |
CI: | |
name: continuous-integration | |
runs-on: ubuntu-latest | |
timeout-minutes: 15 | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
- name: Read .nvmrc | |
run: echo ::set-output name=NVMRC::$(cat .nvmrc) | |
id: nvm | |
- name: Setup Node.js | |
uses: actions/setup-node@master | |
with: | |
node-version: '${{ steps.nvm.outputs.NVMRC }}' | |
- name: Install dependencies | |
run: yarn cache clean --all && yarn install --nonInteractive --frozen-lockfile | |
- name: Lint | |
run: yarn run lint:ci | |
- name: Build | |
run: yarn run build |