-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
104 additions
and
0 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,58 @@ | ||
name: Deploy gh-pages | ||
|
||
on: | ||
push: | ||
branches: ["master"] | ||
|
||
workflow_dispatch: | ||
|
||
permissions: | ||
contents: read | ||
pages: write | ||
id-token: write | ||
|
||
concurrency: | ||
group: "pages" | ||
cancel-in-progress: false | ||
|
||
jobs: | ||
deploy: | ||
environment: | ||
name: github-pages | ||
url: ${{ steps.deployment.outputs.page_url }} | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
- name: Build docs | ||
working-directory: r-package/maq | ||
run: | | ||
# Install pandoc | ||
sudo apt-get install -qq pandoc | ||
# Install R | ||
curl -OLs https://eddelbuettel.github.io/r-ci/run.sh && chmod 0755 run.sh | ||
./run.sh bootstrap | ||
./run.sh install_all | ||
# Install maq | ||
R CMD INSTALL . | ||
# Use pkgdown v1.5 | ||
sudo Rscript -e "install.packages(c('fs', 'highlight', 'httr', 'memoise', 'openssl', 'purrr', 'rmarkdown', 'rstudioapi', 'whisker', 'xml2', 'yaml'))" | ||
sudo Rscript -e "install.packages('https://cran.r-project.org/src/contrib/Archive/pkgdown/pkgdown_1.5.1.tar.gz', repos = NULL, type = 'source')" | ||
# Build site | ||
cp ../../README.md . | ||
cp ../../REFERENCE.md . | ||
cp ../../CHANGELOG.md . | ||
Rscript -e "pkgdown::build_site()" | ||
- name: Setup Pages | ||
uses: actions/configure-pages@v5 | ||
- name: Upload artifact | ||
uses: actions/upload-pages-artifact@v3 | ||
with: | ||
path: 'r-package/maq/docs' | ||
- name: Deploy to GitHub Pages | ||
id: deployment | ||
uses: actions/deploy-pages@v4 |
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 |
---|---|---|
|
@@ -3,3 +3,5 @@ | |
^docs$ | ||
^tests/benchmarks | ||
^tests/valgrind | ||
^_pkgdown\.yml$ | ||
^pkgdown$ |
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,30 @@ | ||
url: https://github.com/grf-labs/maq | ||
navbar: | ||
type: default | ||
left: | ||
- text: "Reference" | ||
href: reference/index.html | ||
- text: "Algorithm reference" | ||
href: REFERENCE.html | ||
- text: "Changelog" | ||
href: CHANGELOG.html | ||
right: | ||
- icon: fa-github fa-lg | ||
href: https://github.com/grf-labs/maq | ||
|
||
reference: | ||
- title: Multi-Armed Qini | ||
contents: | ||
- maq | ||
- predict.maq | ||
- average_gain | ||
- difference_gain | ||
- integrated_difference | ||
- get_ipw_scores | ||
- get_aipw_scores | ||
|
||
- title: Plotting and printing | ||
contents: | ||
- plot.maq | ||
- print.maq | ||
- summary.maq |
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,14 @@ | ||
// This is a workaround to get the online documentation to produce the correct GitHub | ||
// link to the source file in question. pkgdown assumes the package is hosted | ||
// under the root repo, but maq is hosted under /r-package/maq. | ||
// This fix is from: https://github.com/r-lib/pkgdown/issues/1152 | ||
$(function() { | ||
if(window.location.pathname.toLocaleLowerCase().indexOf('/reference') != -1) { | ||
/* Replace '/R/' with '/r-package/maq/R/' in all external links to .R files of maq GitHub repo */ | ||
$('a[href^="https://github.com/grf-labs/maq/blob/master/R"][href*=".R"]').attr('href', (i, val) => { return val.replace('/R/', '/r-package/maq/R/'); }); | ||
} | ||
if(window.location.pathname.toLocaleLowerCase().indexOf('/articles') != -1) { | ||
/* Replace '/vignettes/' with '/r-package/maq/vignettes/' in all external links to .Rmd files of maq GitHub repo */ | ||
$('a[href^="https://github.com/grf-labs/maq/blob/master/vignettes"][href*=".Rmd"]').attr('href', (i, val) => { return val.replace('/vignettes/', '/r-package/maq/vignettes/'); }); | ||
} | ||
}); |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.