run_docs_checks.yml

 1# Generated from xtask::workflows::run_docs_checks
 2# Rebuild with `cargo xtask workflows`.
 3name: run_docs_checks
 4env:
 5  CARGO_TERM_COLOR: always
 6  RUST_BACKTRACE: '1'
 7  CARGO_INCREMENTAL: '0'
 8on:
 9  pull_request:
10    branches:
11    - '**'
12    paths:
13    - docs/**
14    - crates/docs_preprocessor/**
15  push:
16    branches:
17    - main
18    - v[0-9]+.[0-9]+.x
19    paths:
20    - docs/**
21    - crates/docs_preprocessor/**
22jobs:
23  check_docs:
24    if: github.repository_owner == 'zed-industries'
25    runs-on: namespace-profile-8x16-ubuntu-2204
26    steps:
27    - name: steps::checkout_repo
28      uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
29      with:
30        clean: false
31    - name: steps::setup_cargo_config
32      run: |
33        mkdir -p ./../.cargo
34        cp ./.cargo/ci-config.toml ./../.cargo/config.toml
35      shell: bash -euxo pipefail {0}
36    - name: steps::cache_rust_dependencies
37      uses: swatinem/rust-cache@9d47c6ad4b02e050fd481d890b2ea34778fd09d6
38      with:
39        save-if: ${{ github.ref == 'refs/heads/main' }}
40    - name: run_docs_checks::lychee_link_check
41      uses: lycheeverse/lychee-action@82202e5e9c2f4ef1a55a3d02563e1cb6041e5332
42      with:
43        args: --no-progress --exclude '^http' './docs/src/**/*'
44        fail: true
45    - name: steps::setup_linux
46      run: ./script/linux
47      shell: bash -euxo pipefail {0}
48    - name: steps::install_mold
49      run: ./script/install-mold
50      shell: bash -euxo pipefail {0}
51    - name: run_docs_checks::install_mdbook
52      uses: peaceiris/actions-mdbook@ee69d230fe19748b7abf22df32acaa93833fad08
53      with:
54        mdbook-version: 0.4.37
55    - name: run_docs_checks::build_docs
56      run: |
57        mkdir -p target/deploy
58        mdbook build ./docs --dest-dir=../target/deploy/docs/
59      shell: bash -euxo pipefail {0}
60    - name: run_docs_checks::lychee_link_check
61      uses: lycheeverse/lychee-action@82202e5e9c2f4ef1a55a3d02563e1cb6041e5332
62      with:
63        args: --no-progress --exclude '^http' 'target/deploy/docs'
64        fail: true
65    timeout-minutes: 60
66concurrency:
67  group: ${{ github.workflow }}-${{ github.ref_name }}-${{ github.ref_name == 'main' && github.sha || 'anysha' }}
68  cancel-in-progress: true