|
54 | 54 | - name: Install static-sitemap-cli
|
55 | 55 | run: npm install static-sitemap-cli
|
56 | 56 |
|
57 |
| - # FIXME: Keep this up to date |
58 |
| - - name: Install mdbook-linkcheck |
59 |
| - run: | # `-L` because GitHub performs a redirection |
60 |
| - curl -L -o mdbook-linkcheck.zip "https://github.com/Michael-F-Bryan/mdbook-linkcheck/releases/download/v${MDBOOK_LINKCHECK_VER}/mdbook-linkcheck.x86_64-unknown-linux-gnu.zip" |
61 |
| - unzip mdbook-linkcheck.zip mdbook-linkcheck |
62 |
| - chmod +x mdbook-linkcheck |
63 |
| -
|
64 | 57 | - name: Install Python dependencies
|
65 | 58 | run: |
|
66 | 59 | python -m pip install --upgrade pip
|
|
70 | 63 | working-directory: pandocs/
|
71 | 64 | env:
|
72 | 65 | MDBOOK_BUILD__CREATE_MISSING: "false" # Prevent creating missing files in SUMMARY.md
|
73 |
| - MDBOOK_OUTPUT__LINKCHECK__COMMAND: "../mdbook-linkcheck" |
74 | 66 | run: |
|
75 | 67 | mdbook build
|
76 | 68 |
|
|
84 | 76 | with:
|
85 | 77 | path: pandocs/docs/pandocs/
|
86 | 78 |
|
| 79 | + linkcheck: |
| 80 | + name: Check for dead links |
| 81 | + runs-on: ubuntu-latest |
| 82 | + steps: |
| 83 | + - name: Checkout pandocs |
| 84 | + uses: actions/checkout@v4 |
| 85 | + with: |
| 86 | + path: pandocs |
| 87 | + |
| 88 | + - name: Cache Rust build dir |
| 89 | + uses: Swatinem/rust-cache@v2 |
| 90 | + with: |
| 91 | + workspaces: pandocs/target/ |
| 92 | + |
| 93 | + - name: Install mdbook |
| 94 | + uses: peaceiris/actions-mdbook@v2 |
| 95 | + with: |
| 96 | + mdbook-version: 0.4.40 |
| 97 | + |
| 98 | + # FIXME: Keep this up to date |
| 99 | + - name: Install mdbook-linkcheck |
| 100 | + run: | # `-L` because GitHub performs a redirection |
| 101 | + curl -L -o mdbook-linkcheck.zip "https://github.com/Michael-F-Bryan/mdbook-linkcheck/releases/download/v${MDBOOK_LINKCHECK_VER}/mdbook-linkcheck.x86_64-unknown-linux-gnu.zip" |
| 102 | + unzip mdbook-linkcheck.zip mdbook-linkcheck |
| 103 | + chmod +x mdbook-linkcheck |
| 104 | +
|
| 105 | + - name: Install Python dependencies |
| 106 | + run: | |
| 107 | + python -m pip install --upgrade pip |
| 108 | + pip install -r pandocs/requirements.txt |
| 109 | +
|
| 110 | + - name: Check links |
| 111 | + working-directory: pandocs/ |
| 112 | + env: |
| 113 | + MDBOOK_OUTPUT__LINKCHECK__COMMAND: "../mdbook-linkcheck" |
| 114 | + run: | |
| 115 | + mdbook build |
| 116 | +
|
87 | 117 | deploy:
|
88 | 118 | name: Deploy to GitHub pages
|
89 | 119 | # Do not run this unless *pushing* to `master`.
|
|
0 commit comments