build_antora.sh: patch base-url with permalink#45
Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR adds CI environment detection and dynamic base URL configuration to the Antora documentation build process, and removes a branch restriction from the GitHub Pages deployment workflow.
- Detects CircleCI and GitHub CI environments to set repository-specific base URLs
- Modifies and restores
mrdocs.ymlconfiguration file during the build process - Allows GitHub Pages deployment for any branch (previously restricted to
feature/doc)
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| doc/build_antora.sh | Adds CI environment detection logic to dynamically set base URLs and implements config file backup/restore mechanism |
| .github/workflows/ci.yml | Removes branch name restriction from GitHub Pages deployment condition |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Hey! 😊 I was thinking maybe:
But of course, you’d need to check if that really makes sense 👍❤️ |
|
These changes are great, by the way 😊 I can totally see a lot of people replicating this logic |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #45 +/- ##
===========================================
- Coverage 93.03% 92.03% -1.00%
===========================================
Files 40 40
Lines 2713 2838 +125
Branches 1226 1354 +128
===========================================
+ Hits 2524 2612 +88
- Misses 159 187 +28
- Partials 30 39 +9
... and 5 files with indirect coverage changes Continue to review full report in Codecov by Sentry.
🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Pull Request Overview
Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull Request Overview
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull Request Overview
Copilot reviewed 14 out of 14 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull Request Overview
Copilot reviewed 14 out of 14 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull Request Overview
Copilot reviewed 14 out of 14 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull Request Overview
Copilot reviewed 15 out of 15 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| base_url="https://github.com/${repository}/blob/${sha}" | ||
| echo "Setting base-url to $base_url" | ||
| cp mrdocs.yml mrdocs.yml.bak | ||
| perl -i -pe 's{^\s*base-url:.*$}{base-url: '"$base_url/"'}' mrdocs.yml |
There was a problem hiding this comment.
Inconsistent trailing slash handling for base_url. Line 41 adds a trailing slash when writing to mrdocs.yml ("$base_url/"), but line 66 uses $base_url without the trailing slash for HTML substitution. Since the documentation files use paths like {{BASE_URL}}/include/..., using $base_url (without trailing slash) in line 66 is correct. However, line 41 should not add the trailing slash to maintain consistency. Consider changing line 41 to: perl -i -pe 's{^\s*base-url:.*$}{base-url: '"$base_url"'}' mrdocs.yml
| perl -i -pe 's{^\s*base-url:.*$}{base-url: '"$base_url/"'}' mrdocs.yml | |
| perl -i -pe 's{^\s*base-url:.*$}{base-url: '"$base_url"'}' mrdocs.yml |
| Includes `core.hpp` and `macros.hpp`. | ||
|
|
||
| [#initialize] | ||
| ### link:{{BASE_URL}}/include/boost/initialize.hpp[<boost/initialize.hpp>] |
There was a problem hiding this comment.
The path should be <boost/openmethod/initialize.hpp> instead of <boost/initialize.hpp> to match the correct header location.
| ### link:{{BASE_URL}}/include/boost/initialize.hpp[<boost/initialize.hpp>] | |
| ### link:{{BASE_URL}}/include/boost/openmethod/initialize.hpp[<boost/openmethod/initialize.hpp>] |
Not sure what a fallback value should be, although there is one: if the script doesn't recognize the context, it leaves
base-urlalone, that is, currently, it links to thereleasebranch.@pdimov for awareness