-
-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Auto merge of #257 - lennart/docs-custom-index, r=TroyKomodo
feat(ci): add custom html step for docs - Adds CI step to insert custom html into the docs Requested-by: TroyKomodo <[email protected]> Reviewed-by: TroyKomodo <[email protected]>
- Loading branch information
Showing
3 changed files
with
37 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
#!/bin/bash | ||
set -euo pipefail | ||
|
||
repo_url=$1 | ||
commit_hash=$2 | ||
short_commit_hash=$3 | ||
pull_request_number=$4 | ||
|
||
pull_request_code="" | ||
if [ -n "$pull_request_number" ]; then | ||
pull_request_code="<br><a href=\"$repo_url/pull/$pull_request_number\">Pull Request $pull_request_number</a>" | ||
fi | ||
|
||
commit_code="<br><a href=\"$repo_url/commit/$commit_hash\">Commit <code>$short_commit_hash</code></a>" | ||
|
||
sed -i "s#</nav><div class=\"sidebar-resizer\"#<div class=\"version\">Deployed from$pull_request_code$commit_code</div></nav><div class=\"sidebar-resizer\"#" target/doc/index.html |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters