mirror of
https://github.com/renovatebot/renovate.git
synced 2025-01-11 22:46:27 +00:00
ci: Separate jobs for docs linting and building (#22798)
This commit is contained in:
parent
f648444845
commit
5dadd5be6e
2 changed files with 49 additions and 14 deletions
2
.github/actions/setup-node/action.yml
vendored
2
.github/actions/setup-node/action.yml
vendored
|
@ -74,7 +74,7 @@ runs:
|
|||
- name: Generate files
|
||||
shell: bash
|
||||
run: >
|
||||
if [ -d lib ]; then
|
||||
if [[ -d lib ]]; then
|
||||
yarn prepare:generate;
|
||||
fi
|
||||
|
||||
|
|
61
.github/workflows/build.yml
vendored
61
.github/workflows/build.yml
vendored
|
@ -210,7 +210,7 @@ jobs:
|
|||
- name: Lint
|
||||
run: yarn prettier --cache-location .prettier-cache
|
||||
|
||||
lint-other:
|
||||
lint-docs:
|
||||
needs: [setup]
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 7
|
||||
|
@ -228,18 +228,33 @@ jobs:
|
|||
- name: Lint markdown
|
||||
uses: DavidAnson/markdownlint-cli2-action@bb4bb94c73936643d73d345b48fead3e96f90a5e # v10.0.1
|
||||
|
||||
- name: Lint project file structure
|
||||
run: yarn ls-lint
|
||||
|
||||
- name: Check git version
|
||||
run: yarn git-check
|
||||
|
||||
- name: Lint fenced code blocks
|
||||
run: yarn doc-fence-check
|
||||
|
||||
- name: Lint website docs
|
||||
run: yarn -s lint-website-docs
|
||||
|
||||
lint-other:
|
||||
needs: [setup]
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 7
|
||||
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
|
||||
|
||||
- name: Setup Node.js
|
||||
uses: ./.github/actions/setup-node
|
||||
with:
|
||||
node-version: ${{ env.NODE_VERSION }}
|
||||
os: ${{ runner.os }}
|
||||
|
||||
- name: Lint project file structure
|
||||
run: yarn ls-lint
|
||||
|
||||
- name: Check git version
|
||||
run: yarn git-check
|
||||
|
||||
- name: Test schema
|
||||
run: yarn test-schema
|
||||
|
||||
|
@ -376,6 +391,30 @@ jobs:
|
|||
name: renovate-package
|
||||
path: renovate-v0.0.0-semantic-release.tgz
|
||||
|
||||
build-docs:
|
||||
needs: [setup, lint-docs]
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 5
|
||||
if: github.event.pull_request.draft != true
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
|
||||
|
||||
- name: Setup Node.js
|
||||
uses: ./.github/actions/setup-node
|
||||
with:
|
||||
node-version: ${{ env.NODE_VERSION }}
|
||||
os: ${{ runner.os }}
|
||||
|
||||
- name: Build
|
||||
run: yarn -s build:docs
|
||||
|
||||
- name: Upload
|
||||
uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3.1.2
|
||||
with:
|
||||
name: docs
|
||||
path: tmp/docs/
|
||||
|
||||
test-e2e:
|
||||
needs: [setup, build]
|
||||
runs-on: 'ubuntu-latest'
|
||||
|
@ -408,9 +447,11 @@ jobs:
|
|||
- setup
|
||||
- lint-eslint
|
||||
- lint-prettier
|
||||
- lint-docs
|
||||
- lint-other
|
||||
- test-e2e
|
||||
- test-success
|
||||
- build-docs
|
||||
- codecov
|
||||
|
||||
if: github.repository == 'renovatebot/renovate' && github.event_name != 'pull_request'
|
||||
|
@ -450,9 +491,3 @@ jobs:
|
|||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
|
||||
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
|
||||
|
||||
- name: Upload docs
|
||||
uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3.1.2
|
||||
with:
|
||||
name: docs
|
||||
path: tmp/docs/
|
||||
|
|
Loading…
Reference in a new issue