build: cancel previous github action runs (#11940)

This commit is contained in:
Jesse Yang
2020-12-08 15:27:08 -08:00
committed by GitHub
parent 7e6f04fce4
commit 8164aeafb1
9 changed files with 153 additions and 101 deletions

View File

@@ -3,27 +3,31 @@ name: Docs
on:
push:
paths:
- 'docs/**'
- "docs/**"
pull_request:
paths:
- 'docs/**'
- "docs/**"
jobs:
docs:
name: build
runs-on: ubuntu-18.04
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: npm install
working-directory: ./docs
run: |
npm install
- name: lint
working-directory: ./docs
run: |
npm run lint
- name: gatsby build
working-directory: ./docs
run: |
npm run build
- name: Cancel Previous Runs
uses: styfle/cancel-workflow-action@0.6.0
with:
access_token: ${{ github.token }}
- name: Checkout code
uses: actions/checkout@v2
- name: npm install
working-directory: ./docs
run: |
npm install
- name: lint
working-directory: ./docs
run: |
npm run lint
- name: gatsby build
working-directory: ./docs
run: |
npm run build