-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This change is not backwards-compatible - it will require the release of new major version of the action. The following inputs are not supported anymore: * `insert-after-section` * `version-tab` Additionally, the format of the `refs-order` input has changed. --------- Co-authored-by: cicdguy <26552821+cicdguy@users.noreply.github.com> Co-authored-by: cicdguy <cicdguy@users.noreply.github.com>
- Loading branch information
1 parent
abaaa32
commit f2d7715
Showing
8 changed files
with
379 additions
and
455 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 |
---|---|---|
@@ -1,3 +1,4 @@ | ||
--- | ||
name: CLA 🔏 | ||
|
||
on: | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
super-linter-output/ |
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 |
---|---|---|
@@ -1,106 +1,94 @@ | ||
# MultiVersion pkgdown docs action | ||
<!-- BEGIN_ACTION_DOC --> | ||
|
||
Github Action to generate multiple versions of [`pkgdown`](https://pkgdown.r-lib.org/) docs for R packages. | ||
# R pkgdown Multi Version docs | ||
|
||
This Github Actions works under the following assumptions: | ||
GitHub Action to generate multiple versions of [`pkgdown`](https://pkgdown.r-lib.org/) docs for R packages. | ||
|
||
* R package documentation is generated by the R function [`pkgdown::build_site`](https://pkgdown.r-lib.org/reference/build_site.html) | ||
* Documentation is published to the `gh-pages` branch of the package repository and Github Pages is enabled at the root level of the branch | ||
* The version of `pkgdown` used to generate the documentation is `>= v2.0.0` | ||
* The `pkgdown` documentation uses Bootstrap 5 | ||
* The `URL` field in the package DESCRIPTION file contains a reference to the pkgdown site URL (see step 1 [here](https://pkgdown.r-lib.org/articles/pkgdown.html#promoting)) | ||
This GitHub Actions works under the following assumptions: | ||
|
||
- R package documentation is generated by the R function [`pkgdown::build_site`](https://pkgdown.r-lib.org/reference/build_site.html) | ||
- Documentation is published to the `gh-pages` branch of the package repository and GitHub Pages is enabled at the root level of the branch | ||
- The version of `pkgdown` used to generate the documentation is `>= v2.0.0` | ||
- The `pkgdown` documentation uses Bootstrap 5 | ||
- The `URL` field in the package DESCRIPTION file contains a reference to the pkgdown site URL (see step 1 [here](https://pkgdown.r-lib.org/articles/pkgdown.html#promoting)) | ||
|
||
An example of the output of the action can be seen below: | ||
|
||
![Screenshot with example output](example.png) | ||
|
||
## Action type | ||
## Description | ||
|
||
Composite | ||
Generates multisite R documentation created with pkgdown. | ||
|
||
## Inputs | ||
## Action Type | ||
|
||
* `path`: | ||
Composite | ||
|
||
_Description_: Path to package's root | ||
## Author | ||
|
||
_Required_: `false` | ||
Insights Engineering | ||
|
||
_Default_: `.` | ||
## Inputs | ||
|
||
* `default-landing-page`: | ||
- `path`: | ||
|
||
_Description_: The default branch or tag on gh-pages that corresponds to the landing page. For instance, if your root index page on gh-pages is built using the 'main' branch, then the root page of the website will correspond to this page. If 'latest-tag' is selected, then the latest version will become the default. | ||
_Description_: Path to package's root | ||
|
||
_Required_: `false` | ||
_Required_: `false` | ||
|
||
_Default_: `main` | ||
_Default_: `.` | ||
|
||
* `branches-or-tags-to-list`: | ||
- `default-landing-page`: | ||
|
||
_Description_: Which branches or tags should be listed under the 'Versions' dropdown menu on the landing page? This input should be a regular expression in R. | ||
_Description_: The default branch or tag on gh-pages that corresponds to the landing page. | ||
For instance, if your root index page on gh-pages is built using the 'main' | ||
branch, then the root page of the site will correspond to this page. | ||
If 'latest-tag' is selected, then the latest version will become the default. | ||
|
||
_Required_: `false` | ||
_Required_: `false` | ||
|
||
_Default_: `^main$|^devel$|^pre-release$|^latest-tag$|^develop$|^v([0-9]+\\.)?([0-9]+\\.)?([0-9]+)$` | ||
_Default_: `main` | ||
|
||
* `insert-after-section`: | ||
- `branches-or-tags-to-list`: | ||
|
||
_Description_: After which section in the navbar should the 'Versions' dropdown be added? Choose between 'Reference' and 'Changelog' for the surest of choices. | ||
_Description_: Which branches or tags should be listed under the 'Versions' dropdown menu on the landing page? This input should be a regular expression in R. | ||
|
||
_Required_: `false` | ||
|
||
_Default_: `Changelog` | ||
|
||
* `version-tab`: | ||
_Default_: `^main$|^devel$|^prerelease$|^latest-tag$|^release-candidate$|^develop$|^v([0-9]+\.)?([0-9]+\.)?([0-9]+)|^v([0-9]+\.)?([0-9]+\.)?([0-9]+)(-rc[0-9]+)$` | ||
|
||
_Description_: Configuration of how the drop-down list should appear for multiple versions. It should be set as an ASCII text representation of an R list object. Example: | ||
- `refs-order`: | ||
|
||
```R | ||
list(config = list( | ||
tooltip = list( | ||
main = "Tooltip for main branch" | ||
), | ||
text = list( | ||
main = "main branch" | ||
) | ||
)) | ||
``` | ||
|
||
String should be quoted with " sign | ||
_Description_: The order in which refs should appear in the drop-down list. Versions not in the vector | ||
will appear below refs listed here. | ||
If docs have never been generated for the ref, the ref will not appear in the | ||
drop-down. Similarly, if docs have been generated for the ref, but the ref is not | ||
listed in the vector, it will not appear in the drop-down. | ||
Example (the refs on the list should be separated by space): | ||
main devel prerelease latest-tag | ||
|
||
_Required_: `false` | ||
|
||
_Default_: `` | ||
* `refs-order`: | ||
_Description_: The order in which refs should appear in the drop-down list. Versions not in the vector | ||
will appear below refs listed here. | ||
_Default_: `main devel prerelease latest-tag` | ||
|
||
If docs have never been generated for the ref, the ref will not appear in the | ||
drop-down. Similarly, if docs have been generated for the ref, but the ref is not | ||
listed in the vector, it will not appear in the drop-down. | ||
- `latest-tag-alt-name`: | ||
|
||
Example: | ||
`c("main", "devel", "pre-release", "latest-tag")` | ||
_Description_: An alternate name for the 'latest-tag' item | ||
|
||
_Required_: `false` | ||
|
||
_Default_: `c("main", "devel", "pre-release", "latest-tag")` | ||
_Default_: `""` | ||
|
||
* `latest-tag-alt-name`: | ||
- `release-candidate-alt-name`: | ||
|
||
_Description_: An alternate name for the 'latest-tag' item | ||
_Description_: An alternate name for the 'release-candidate' item | ||
|
||
_Required_: `false` | ||
|
||
_Default_: `''` | ||
_Default_: `""` | ||
|
||
## Outputs | ||
|
||
None. | ||
## Usage | ||
None | ||
|
||
Please refer to [this example](https://github.com/insightsengineering/r.pkg.template/blob/main/.github/workflows/pkgdown.yaml) workflow to see how this action is used in an end-to-end documentation publishing workflow. | ||
<!-- END_ACTION_DOC --> |
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
Oops, something went wrong.