.github: Add destination depth to doc build #592
Merged
+2
−0
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This repo stores different versions of the doc into multiple directories of the gh-pages branch.
Due to this, links requiring to reach the website root (not the content root of the doc itself), are broken if the deploy directory is different than
./
(e.g../main
,./prs/1234
)To resolve this issue, the ADOC_TARGET_DEPTH env variable was implemented analogdevicesinc/doctools@1da4cf1 to allow tuning the depth before the doc build.
Example of ADOC_TARGET_DEPTH values:
On Doctools I also added a snipped to generate a JSON with the tags/branches/prs of the build docs, but since this repo uses peaceiris/actions-gh-pages@v3 action to commit and push to gh-pages, I didn't implement it here.
However, this tags.json file would be nice to create a dropdown to switch between versions on the live doc.
Type of change
Please delete options that are not relevant.
How has this been tested?
This feature was tested on the Doctools repo itself, with different builds linking properly:
https://analogdevicesinc.github.io/doctools/
https://analogdevicesinc.github.io/doctools/v0.3.38/
Then I tested different values of ADOC_TARGET_DEPTH while building this repo doc locally.
Documentation
Checklist: