ansible-community / ansible-community/github-docs-build

Add linting to the build action

Open
#46 0 comments 1 reaction 0 assignees View on GitHub
Dominant language
Jinja
Stars
13
Forks
10
Avg merge
10h 14m
Merged PRs (30d)
1

Description

My original prototypes before this repository used the `antsibull-docs lint-collection-docs` command.

I think it got lost when I converted everything to actions/workflows, and for the most part, it was fine because if the docs didn't build, that would be your signal there was a problem :)

However, today I ran into an issue where the entire RST file I added was being ignored. So there was nothing in the output to indicate why, just errors from other pages that tried to reference the new ones.

Finally I ran lint and figured out the issue, and this is a great reminder why that command is still needed!

Failing workflow: https://github.com/ansible-collections/community.hashi_vault/runs/6249903735?check_suite_focus=true

This page did work in a previous workflow, so clearly something I added to the page made it fail, but I could not figure it out from build output alone.

Lint showed me the issue: I added some labels without the right prefix:

```
../../docs/docsite/rst/migration_hashi_vault_lookup.rst:216:0: Label "kv_response" does not start with expected prefix "ansible_collections.community.hashi_vault.docsite."
../../docs/docsite/rst/migration_hashi_vault_lookup.rst:287:0: Label "kv_replacements" does not start with expected prefix "ansible_collections.community.hashi_vault.docsite."
```

Contributor guide

No contributing guide indexed for this repository

Research direction

Review the actions/workflows configuration and the failing workflow linked in the issue, then locate where documentation builds are run. Add the `antsibull-docs lint-collection-docs` check to that build action and verify the workflow reports invalid labels such as those shown in the issue.

Written by the indexing model from the issue text.

Assessment

Tech stack
github-actions
Domain
ci-cd, documentation
Issue type
Feature
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
52/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.