ci: reduce ci running (#3707)

This commit is contained in:
Daniel Roe 2022-03-16 13:58:53 +00:00 committed by GitHub
parent 131cf69a56
commit 57294a5e5a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 46 additions and 8 deletions

View File

@ -2,9 +2,13 @@ name: CI
on:
push:
paths-ignore:
- 'docs/**'
branches:
- main
pull_request:
paths-ignore:
- 'docs/**'
branches:
- main
@ -57,9 +61,6 @@ jobs:
- name: Lint
run: yarn lint
- name: Lint (docs)
run: yarn lint:docs
test-fixtures:
runs-on: ${{ matrix.os }}
@ -141,6 +142,11 @@ jobs:
run: yarn test:types
build-release:
if: |
github.event_name == 'push' &&
!contains(github.event.head_commit.message, '[skip-release]') &&
!contains(github.event.head_commit.message, 'chore') &&
!contains(github.event.head_commit.message, 'docs')
needs:
- lint
- build
@ -171,11 +177,6 @@ jobs:
key: ${{ matrix.os }}-node-v${{ matrix.node }}-${{ github.sha }}
- name: Release Edge
if: |
github.event_name == 'push' &&
!contains(github.event.head_commit.message, '[skip-release]') &&
!contains(github.event.head_commit.message, 'chore') &&
!contains(github.event.head_commit.message, 'docs')
run: ./scripts/release-edge.sh
env:
NODE_AUTH_TOKEN: ${{secrets.NODE_AUTH_TOKEN}}

37
.github/workflows/docs.yml vendored Normal file
View File

@ -0,0 +1,37 @@
name: Docs
on:
push:
paths:
- 'docs/**'
- '.github/workflows/docs.yml'
branches:
- main
pull_request:
paths:
- 'docs/**'
- '.github/workflows/docs.yml'
branches:
- main
jobs:
lint-docs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
node: [14]
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node }}
cache: 'yarn'
- name: Install dependencies
run: yarn --immutable
- name: Lint (docs)
run: yarn lint:docs