|
24 | 24 | INFRAHUB_IMAGE_VER: "local" |
25 | 25 | PYTEST_XDIST_WORKER_COUNT: 4 |
26 | 26 | INFRAHUB_TEST_IN_DOCKER: 1 |
27 | | - VALE_VERSION: "3.0.7" |
| 27 | + VALE_VERSION: "3.7.1" |
28 | 28 | GITHUB_PR_NUMBER: ${{ github.event.pull_request.number }} |
29 | 29 | METRICS_ENDPOINT: ${{ secrets.METRICS_ENDPOINT }} |
30 | 30 |
|
@@ -115,6 +115,62 @@ jobs: |
115 | 115 | SHELLCHECK_OPTS: --exclude=SC2086 --exclude=SC2046 --exclude=SC2004 --exclude=SC2129 |
116 | 116 |
|
117 | 117 |
|
| 118 | + documentation: |
| 119 | + defaults: |
| 120 | + run: |
| 121 | + working-directory: ./docs |
| 122 | + if: | |
| 123 | + always() && !cancelled() && |
| 124 | + !contains(needs.*.result, 'failure') && |
| 125 | + !contains(needs.*.result, 'cancelled') && |
| 126 | + needs.files-changed.outputs.documentation == 'true' |
| 127 | + needs: ["files-changed", "yaml-lint", "python-lint"] |
| 128 | + runs-on: "ubuntu-22.04" |
| 129 | + timeout-minutes: 5 |
| 130 | + steps: |
| 131 | + - name: "Check out repository code" |
| 132 | + uses: "actions/checkout@v4" |
| 133 | + with: |
| 134 | + submodules: true |
| 135 | + - name: Install NodeJS |
| 136 | + uses: actions/setup-node@v4 |
| 137 | + with: |
| 138 | + node-version: 20 |
| 139 | + cache: 'npm' |
| 140 | + cache-dependency-path: docs/package-lock.json |
| 141 | + - name: "Install dependencies" |
| 142 | + run: npm install |
| 143 | + - name: "Setup Python environment" |
| 144 | + run: "pip install invoke toml" |
| 145 | + - name: "Build docs website" |
| 146 | + run: "invoke docs" |
| 147 | + |
| 148 | + |
| 149 | + validate-documentation-style: |
| 150 | + if: | |
| 151 | + always() && !cancelled() && |
| 152 | + !contains(needs.*.result, 'failure') && |
| 153 | + !contains(needs.*.result, 'cancelled') |
| 154 | + needs: ["files-changed", "yaml-lint", "python-lint"] |
| 155 | + runs-on: "ubuntu-22.04" |
| 156 | + timeout-minutes: 5 |
| 157 | + steps: |
| 158 | + - name: "Check out repository code" |
| 159 | + uses: "actions/checkout@v4" |
| 160 | + with: |
| 161 | + submodules: true |
| 162 | + |
| 163 | + # The official GitHub Action for Vale doesn't work, installing manually instead: |
| 164 | + # https://github.com/errata-ai/vale-action/issues/103 |
| 165 | + - name: Download Vale |
| 166 | + run: | |
| 167 | + curl -sL "https://github.com/errata-ai/vale/releases/download/v${VALE_VERSION}/vale_${VALE_VERSION}_Linux_64-bit.tar.gz" -o vale.tar.gz |
| 168 | + tar -xzf vale.tar.gz |
| 169 | + env: |
| 170 | + VALE_VERSION: ${{ env.VALE_VERSION }} |
| 171 | + - name: "Validate documentation style" |
| 172 | + run: ./vale $(find ./docs -type f \( -name "*.mdx" -o -name "*.md" \) ) |
| 173 | + |
118 | 174 | unit-tests: |
119 | 175 | env: |
120 | 176 | # workaround for Rich table column width |
|
0 commit comments