-
-
Notifications
You must be signed in to change notification settings - Fork 2
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
6 changed files
with
1,127 additions
and
107 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 |
---|---|---|
|
@@ -18,53 +18,73 @@ jobs: | |
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/checkout@v3 | ||
|
||
# - name: Change directory | ||
# run: cd mlr-org | ||
|
||
- uses: r-lib/actions/setup-r@v2 | ||
with: | ||
use-public-rspm: true | ||
r-version: 4.1.3 | ||
# pak-version: devel | ||
|
||
- uses: r-lib/actions/setup-pandoc@v2 | ||
# - uses: r-lib/actions/setup-pandoc@v2 | ||
- uses: quarto-dev/quarto-actions/setup@v2 | ||
|
||
- uses: r-lib/actions/setup-r-dependencies@v2 | ||
# set date/week for use in cache creation | ||
# https://github.community/t5/GitHub-Actions/How-to-set-and-access-a-Workflow-variable/m-p/42970 | ||
# - cache R packages daily | ||
- name: "[Cache] Prepare daily timestamp for cache" | ||
if: runner.os != 'Windows' | ||
id: date | ||
run: echo "::set-output name=date::$(date '+%d-%m')" | ||
|
||
- name: "[Cache] Cache R packages" | ||
if: runner.os != 'Windows' | ||
uses: pat-s/always-upload-cache@v3 | ||
with: | ||
# pak-version: devel | ||
extra-packages: | | ||
any::devtools | ||
path: ${{ env.R_LIBS_USER }} | ||
key: ${{ runner.os }}-r-${{ matrix.config.r }}-${{steps.date.outputs.date}} | ||
restore-keys: ${{ runner.os }}-r-${{ matrix.config.r }}-${{steps.date.outputs.date}} | ||
|
||
- name: Install Remotes | ||
- name: Install system dependencies | ||
if: runner.os == 'Linux' | ||
run: | | ||
devtools::install_github("mlr-org/mlr3book") | ||
devtools::install_github("mlr-org/mlr3extralearners") | ||
devtools::install_github("mlr-org/mlr3proba") | ||
devtools::install_github("mlr-org/mlr3mbo") | ||
devtools::install_github("mlr-org/mlr3spatiotempcv") | ||
devtools::install_github("openml/openml-r") | ||
shell: Rscript {0} | ||
|
||
- name: Install Packages | ||
run: devtools::install() | ||
shell: Rscript {0} | ||
while read -r cmd | ||
do | ||
eval sudo $cmd | ||
done < <(Rscript -e 'install.packages("remotes", repos = "cloud.r-project.org"); cat(remotes::system_requirements("ubuntu", "20.04"), sep = "\n")') | ||
- name: Build Website | ||
run: rmarkdown::render_site(input = "mlr-org", encoding = "UTF-8") | ||
shell: Rscript {0} | ||
- uses: pat-s/actions/setup-renv@renv-subdir | ||
env: | ||
RENV_CONFIG_REPOS_OVERRIDE: ${{ env.RSPM }} | ||
with: | ||
working-directory: mlr-org | ||
cache-version: 1 | ||
|
||
# bug in render_site deletes rss feed | ||
# rss feed with last post can be restored by rendering the post again | ||
# https://github.com/rstudio/distill/issues/381 | ||
- name: Restore RSS Feed | ||
- name: debug | ||
env: | ||
QUARTO_PUB_AUTH_TOKEN: ${{ inputs.QUARTO_PUB_AUTH_TOKEN }} | ||
RENV_CONFIG_REPOS_OVERRIDE: ${{ env.RSPM }} | ||
run: | | ||
files = list.files("mlr-org/_posts", ".Rmd", full.names = TRUE, recursive = TRUE) | ||
rmarkdown::render(files[length(files)], encoding = "UTF-8") | ||
shell: Rscript {0} | ||
cd mlr-org | ||
R -q -e 'install.packages("renv", repos = "cloud.r-project.org"); renv::restore()' | ||
ls /home/runner/work/mlr3website/mlr3website/mlr-org/renv/library/R-4.2/x86_64-pc-linux-gnu | ||
git config --global user.email "${{ inputs.GITHUB_EMAIL }}" | ||
git config --global user.name "${{ inputs.GITHUB_USERNAME }}" | ||
quarto publish gh-pages | ||
- name: Deploy | ||
if: ${{ github.event_name == 'push' }} | ||
uses: JamesIves/[email protected] | ||
with: | ||
branch: gh-pages | ||
folder: mlr-org/docs | ||
single-commit: false | ||
# - name: Install Packages | ||
# run: devtools::install() | ||
# shell: Rscript {0} | ||
|
||
# - name: Render Quarto Project | ||
# uses: quarto-dev/quarto-actions/render@v2 | ||
# with: | ||
# path: mlr-org | ||
|
||
# - name: Publish to GitHub Pages (and render) | ||
# uses: quarto-dev/quarto-actions/publish@v2 | ||
# with: | ||
# path: mlr-org | ||
# target: gh-pages |
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,82 +1,82 @@ | ||
on: | ||
workflow_dispatch: | ||
push: | ||
branches: | ||
- main | ||
paths: | ||
- 'mlr-org/_gallery/**' | ||
pull_request: | ||
branches: | ||
- main | ||
paths: | ||
- 'mlr-org/_gallery/**' | ||
schedule: | ||
- cron: "0 6 * * *" | ||
# on: | ||
# workflow_dispatch: | ||
# push: | ||
# branches: | ||
# - main | ||
# paths: | ||
# - 'mlr-org/_gallery/**' | ||
# pull_request: | ||
# branches: | ||
# - main | ||
# paths: | ||
# - 'mlr-org/_gallery/**' | ||
# schedule: | ||
# - cron: "0 6 * * *" | ||
|
||
name: render-gallery | ||
# name: render-gallery | ||
|
||
jobs: | ||
render-gallery: | ||
runs-on: ubuntu-latest | ||
# jobs: | ||
# render-gallery: | ||
# runs-on: ubuntu-latest | ||
|
||
env: | ||
R_REMOTES_NO_ERRORS_FROM_WARNINGS: true | ||
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} | ||
# env: | ||
# R_REMOTES_NO_ERRORS_FROM_WARNINGS: true | ||
# GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
# steps: | ||
# - uses: actions/checkout@v2 | ||
|
||
- uses: r-lib/actions/setup-r@v2 | ||
with: | ||
use-public-rspm: true | ||
r-version: 4.1.3 | ||
# - uses: r-lib/actions/setup-r@v2 | ||
# with: | ||
# use-public-rspm: true | ||
# r-version: 4.1.3 | ||
|
||
- uses: r-lib/actions/setup-pandoc@v2 | ||
# - uses: r-lib/actions/setup-pandoc@v2 | ||
|
||
- uses: r-lib/actions/setup-r-dependencies@v2 | ||
with: | ||
extra-packages: | | ||
any::devtools | ||
# - uses: r-lib/actions/setup-r-dependencies@v2 | ||
# with: | ||
# extra-packages: | | ||
# any::devtools | ||
|
||
- name: Install Packages | ||
run: devtools::install() | ||
shell: Rscript {0} | ||
# - name: Install Packages | ||
# run: devtools::install() | ||
# shell: Rscript {0} | ||
|
||
- name: Render Gallery | ||
run: | | ||
files = list.files("mlr-org/_gallery/", pattern = ".Rmd", full.names = TRUE, recursive = TRUE) | ||
mlr3misc::walk(files, function(file) rmarkdown::render(file, encoding = "UTF-8", params = list(eval_all = FALSE))) | ||
shell: Rscript {0} | ||
# - name: Render Gallery | ||
# run: | | ||
# files = list.files("mlr-org/_gallery/", pattern = ".Rmd", full.names = TRUE, recursive = TRUE) | ||
# mlr3misc::walk(files, function(file) rmarkdown::render(file, encoding = "UTF-8", params = list(eval_all = FALSE))) | ||
# shell: Rscript {0} | ||
|
||
- name: Build Website | ||
run: rmarkdown::render_site(input = "mlr-org", encoding = "UTF-8") | ||
shell: Rscript {0} | ||
# - name: Build Website | ||
# run: rmarkdown::render_site(input = "mlr-org", encoding = "UTF-8") | ||
# shell: Rscript {0} | ||
|
||
# bug in render_site deletes rss feed | ||
# rss feed with last post can be restored by rendering the post again | ||
# https://github.com/rstudio/distill/issues/381 | ||
- name: Restore RSS Feed | ||
run: | | ||
files = list.files("mlr-org/_posts", ".Rmd", full.names = TRUE, recursive = TRUE) | ||
rmarkdown::render(files[length(files)], encoding = "UTF-8") | ||
shell: Rscript {0} | ||
# # bug in render_site deletes rss feed | ||
# # rss feed with last post can be restored by rendering the post again | ||
# # https://github.com/rstudio/distill/issues/381 | ||
# - name: Restore RSS Feed | ||
# run: | | ||
# files = list.files("mlr-org/_posts", ".Rmd", full.names = TRUE, recursive = TRUE) | ||
# rmarkdown::render(files[length(files)], encoding = "UTF-8") | ||
# shell: Rscript {0} | ||
|
||
- name: Commit Results | ||
if: ${{ github.event_name == 'push' }} | ||
run: | | ||
rm -f .github/pkg.lock | ||
git config --local user.name "$GITHUB_ACTOR" | ||
git config --local user.email "[email protected]" | ||
git config --local pull.rebase false | ||
git pull | ||
git add -A | ||
git commit -m 'refactor: render gallery posts' | ||
git push origin | ||
# - name: Commit Results | ||
# if: ${{ github.event_name == 'push' }} | ||
# run: | | ||
# rm -f .github/pkg.lock | ||
# git config --local user.name "$GITHUB_ACTOR" | ||
# git config --local user.email "[email protected]" | ||
# git config --local pull.rebase false | ||
# git pull | ||
# git add -A | ||
# git commit -m 'refactor: render gallery posts' | ||
# git push origin | ||
|
||
- name: Deploy | ||
if: ${{ github.event_name == 'push' }} | ||
uses: JamesIves/[email protected] | ||
with: | ||
branch: gh-pages | ||
folder: mlr-org/docs | ||
single-commit: false | ||
# - name: Deploy | ||
# if: ${{ github.event_name == 'push' }} | ||
# uses: JamesIves/[email protected] | ||
# with: | ||
# branch: gh-pages | ||
# folder: mlr-org/docs | ||
# single-commit: false |
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
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,7 @@ | ||
sandbox/ | ||
library/ | ||
local/ | ||
cellar/ | ||
lock/ | ||
python/ | ||
staging/ |
Oops, something went wrong.