chore: fix docs pipeline (#25504)
* chore: change trigger rule * chore: check tag and file modifed
This commit is contained in:
parent
514f73f4b1
commit
79df1954eb
|
@ -5,10 +5,8 @@ on:
|
||||||
branches:
|
branches:
|
||||||
- master
|
- master
|
||||||
- v[0-9]+.[0-9]+
|
- v[0-9]+.[0-9]+
|
||||||
paths:
|
|
||||||
- "docs/**"
|
|
||||||
tags:
|
tags:
|
||||||
- "*"
|
- v[0-9]+.[0-9]+.[0-9]+
|
||||||
pull_request:
|
pull_request:
|
||||||
branches:
|
branches:
|
||||||
- master
|
- master
|
||||||
|
@ -24,9 +22,12 @@ jobs:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
|
|
||||||
- name: Check
|
- name: Check
|
||||||
|
id: check
|
||||||
run: |
|
run: |
|
||||||
source ci/env.sh
|
source ci/env.sh
|
||||||
ci/channel_restriction.sh edge beta
|
echo "::set-output name=tag::$CI_TAG"
|
||||||
|
eval "$(ci/channel-info.sh)"
|
||||||
|
echo "::set-output name=channel::$CHANNEL"
|
||||||
|
|
||||||
- name: Get specific changed files
|
- name: Get specific changed files
|
||||||
id: changed-files-specific
|
id: changed-files-specific
|
||||||
|
@ -35,14 +36,28 @@ jobs:
|
||||||
files: |
|
files: |
|
||||||
docs/**
|
docs/**
|
||||||
|
|
||||||
|
- name: Pre Build
|
||||||
|
id: prebuild
|
||||||
|
run: |
|
||||||
|
echo "::set-output name=need_to_build::${{
|
||||||
|
steps.check.outputs.tag != ''
|
||||||
|
||
|
||||||
|
(
|
||||||
|
(steps.check.outputs.channel == 'edge' || steps.check.outputs.channel == 'beta')
|
||||||
|
&&
|
||||||
|
steps.changed-files-specific.outputs.any_change != ''
|
||||||
|
)
|
||||||
|
}}"
|
||||||
|
shell: bash
|
||||||
|
|
||||||
- name: Setup Node
|
- name: Setup Node
|
||||||
if: steps.changed-files-specific.outputs.any_changed == 'true'
|
if: ${{ steps.prebuild.outputs.need_to_build == 'true' }}
|
||||||
uses: actions/setup-node@v3
|
uses: actions/setup-node@v3
|
||||||
with:
|
with:
|
||||||
node-version: 14
|
node-version: 14
|
||||||
|
|
||||||
- name: Build
|
- name: Build
|
||||||
if: steps.changed-files-specific.outputs.any_changed == 'true'
|
if: ${{ steps.prebuild.outputs.need_to_build == 'true' }}
|
||||||
working-directory: docs
|
working-directory: docs
|
||||||
run: |
|
run: |
|
||||||
npm install
|
npm install
|
||||||
|
|
Loading…
Reference in New Issue