Run doc lint only if files changed

This commit is contained in:
Sidharth Vinod 2022-10-03 14:24:51 +08:00
parent 8d6af3dfed
commit 9c5c85d34a
No known key found for this signature in database
GPG Key ID: FB5CCD378D3907CD
1 changed files with 18 additions and 15 deletions

View File

@ -24,21 +24,6 @@ jobs:
# ref: ${{ github.event.pull_request.head.ref }}
fetch-depth: 0
- uses: pnpm/action-setup@v2
# uses version from "packageManager" field in package.json
- name: Setup Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
cache: pnpm
node-version: ${{ matrix.node-version }}
- name: Install Packages
run: |
pnpm install --frozen-lockfile
env:
CYPRESS_CACHE_FOLDER: .cache/Cypress
- name: Run changed-files using the fork point of a pull request
id: changed-files-fork-point
uses: tj-actions/changed-files@v29
@ -48,6 +33,24 @@ jobs:
packages/mermaid/src/docs/*
packages/mermaid/src/docs.mts
- uses: pnpm/action-setup@v2
if: steps.changed-files-fork-point.outputs.only_modified == 'true'
# uses version from "packageManager" field in package.json
- name: Setup Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
if: steps.changed-files-fork-point.outputs.only_modified == 'true'
with:
cache: pnpm
node-version: ${{ matrix.node-version }}
- name: Install Packages
if: steps.changed-files-fork-point.outputs.only_modified == 'true'
run: |
pnpm install --frozen-lockfile
env:
CYPRESS_CACHE_FOLDER: .cache/Cypress
- name: Run step if any file(s) in the docs folder change
if: steps.changed-files-fork-point.outputs.only_modified == 'true'
run: |