mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-11-06 22:04:16 +01:00
Run doc lint only if files changed
This commit is contained in:
33
.github/workflows/lint-docs.yml
vendored
33
.github/workflows/lint-docs.yml
vendored
@@ -24,21 +24,6 @@ jobs:
|
|||||||
# ref: ${{ github.event.pull_request.head.ref }}
|
# ref: ${{ github.event.pull_request.head.ref }}
|
||||||
fetch-depth: 0
|
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
|
- name: Run changed-files using the fork point of a pull request
|
||||||
id: changed-files-fork-point
|
id: changed-files-fork-point
|
||||||
uses: tj-actions/changed-files@v29
|
uses: tj-actions/changed-files@v29
|
||||||
@@ -48,6 +33,24 @@ jobs:
|
|||||||
packages/mermaid/src/docs/*
|
packages/mermaid/src/docs/*
|
||||||
packages/mermaid/src/docs.mts
|
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
|
- name: Run step if any file(s) in the docs folder change
|
||||||
if: steps.changed-files-fork-point.outputs.only_modified == 'true'
|
if: steps.changed-files-fork-point.outputs.only_modified == 'true'
|
||||||
run: |
|
run: |
|
||||||
|
|||||||
Reference in New Issue
Block a user