You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
docs: update documentation workflow readme with comprehensive guide
- Add clear description of workflow components and architecture
- Document the two-stage PR comment system
- Describe validation features in detail
- Add troubleshooting section for common issues
- Include section on future improvements
|`post-comment`| Post results as PR comment | (from preset) |
188
+
|`create-issues`| Create GitHub issues for failures | (from preset) |
189
+
|`fail-on-error`| Fail workflow on validation errors | (from preset) |
190
+
191
+
## Future Improvements
192
+
193
+
While the current documentation workflow system is robust and efficient, there are several areas for potential future enhancements:
194
+
195
+
1.**Incremental Validation**
196
+
- Implement only checking files that have changed since the last validation
197
+
- Create a dependency graph of documentation files to optimize cross-reference checking
198
+
199
+
2.**Advanced Link Checking**
200
+
- Add specialized handling for API endpoint references
201
+
- Implement schema validation for URLs in documentation
202
+
- Add validation for image references
203
+
204
+
3.**Better Local Integration**
205
+
- Create a pre-commit hook that runs the same validation locally
206
+
- Develop a VSCode extension for real-time documentation validation
207
+
208
+
4.**Enhanced Reporting**
209
+
- Implement trending analysis of documentation issues
210
+
- Add visualization of common problem areas
211
+
- Create a documentation quality dashboard
212
+
213
+
5.**Automated Fixes**
214
+
- Implement auto-correction for common documentation issues
215
+
- Add AI-assisted suggestions for improvement
216
+
217
+
6.**Integration with External Systems**
218
+
- Sync validation results with project management tools
219
+
- Implement notification integrations beyond GitHub and Slack
220
+
221
+
By continuously improving the documentation workflow, we can maintain high-quality documentation while making the validation process more efficient for contributors.
245
222
246
223
## Troubleshooting
247
224
248
225
### Common Issues and Solutions
249
226
250
227
#### File Detection Problems
251
228
If changed files aren't being detected correctly:
252
-
- The workflow includes robust fallback mechanisms
253
-
- Default files will be used when detection fails
229
+
- The workflow includes fallback mechanisms to ensure validation occurs
254
230
- Check workflow logs for fallback notices
231
+
- Verify you have changes in the docs/ directory
255
232
256
233
#### Link Checking Errors
257
234
If you see link checking errors:
258
-
1. Run link checking locally with `lychee docs/**/*.md`
259
-
2. Add legitimate failing links to `.github/docs/.lycheeignore`
260
-
3. For internal cross-references, ensure anchors match headers exactly
261
-
262
-
#### Cross-Reference Issues
263
-
When files or headings are moved/renamed:
264
-
1. The workflow automatically checks for broken cross-references in:
265
-
- Other documentation files
266
-
- Code comments and strings throughout the codebase
267
-
2. Fix any reported broken references by updating the links to point to the new location
268
-
3. Use the validation results to identify which files reference the changed content
269
-
270
-
#### Vale Style Issues
271
-
If you see Vale style warnings:
272
-
1. Check specific rules in the Vale output
273
-
2. Use inline comments to disable specific rules: `<!-- vale StyleName.RuleName = NO -->`
235
+
- Run link checking locally: `lychee docs/**/*.md`
236
+
- Add exceptions to `.github/docs/.lycheeignore` if needed
237
+
- For internal cross-references, ensure anchors match headers exactly
238
+
239
+
#### Style Validation Issues
240
+
If you encounter Vale style warnings:
241
+
- Check specific rules in the output
242
+
- Use inline comments to disable specific rules when appropriate:
243
+
`<!-- vale StyleName.RuleName = NO -->`
244
+
- Consider updating the Vale style rules if the issue occurs frequently
274
245
275
246
#### Preview URL Issues
276
-
Preview URLs use a standardized format:
247
+
The preview URL system converts branch names to URL-friendly format:
277
248
- Branch names with slashes are converted to dashes
278
-
- Use direct links from PR comments
279
249
- Default links are provided even when no files change
250
+
- The format is: `https://coder.com/docs/@<branch-name>`
280
251
281
-
## Usage in Other Workflows
282
-
283
-
If you need to incorporate documentation validation in other workflows:
284
-
285
-
1. **Use the Unified Workflow**:
286
-
```yaml
287
-
jobs:
288
-
docs-validation:
289
-
uses: ./.github/workflows/docs-unified.yaml
290
-
with:
291
-
preset: 'pr' # or other preset based on context
292
-
```
293
-
294
-
2. **Use Configuration Presets**:
295
-
- `pr`: For pull request validation with preview links
296
-
- `post-merge`: For checking link integrity after merge
297
-
- `weekly`: For comprehensive scheduled checks
298
-
- `ci`: For fast checks during CI/CD pipelines
299
-
300
-
3. **Extend with Custom Options** (if needed):
301
-
```yaml
302
-
with:
303
-
preset: 'pr'
304
-
check-links: false # Disable specific checks
305
-
create-issues: true # Enable additional features
306
-
```
252
+
## Using Documentation Validation in Custom Workflows
307
253
308
-
## Example Workflow Files
254
+
To use documentation validation in your own workflows:
309
255
310
-
For reference implementation, see these workflow files:
256
+
```yaml
257
+
jobs:
258
+
custom-docs-check:
259
+
uses: ./.github/workflows/docs-unified.yaml
260
+
with:
261
+
preset: 'pr'# Choose a preset based on your needs
262
+
# Optional overrides
263
+
check-links: false # For faster checks
264
+
notification-channels: 'slack'# For notifications
265
+
```
311
266
312
-
- `docs-preview.yaml`: PR validation with preview links
313
-
- `docs-link-check.yaml`: Post-merge link integrity checks
0 commit comments