diff --git a/.github/workflows/build-website.yml b/.github/workflows/build-website.yml index 8f69e3070..f2bcefec4 100644 --- a/.github/workflows/build-website.yml +++ b/.github/workflows/build-website.yml @@ -18,53 +18,57 @@ 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 - with: - # pak-version: devel - extra-packages: | - any::devtools - - - 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"); 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/github-pages-deploy-action@4.1.5 - 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 diff --git a/.github/workflows/render-gallery.yml b/.github/workflows/render-gallery.yml index e547019a0..8853e20dd 100644 --- a/.github/workflows/render-gallery.yml +++ b/.github/workflows/render-gallery.yml @@ -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 "$GITHUB_ACTOR@users.noreply.github.com" - 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 "$GITHUB_ACTOR@users.noreply.github.com" +# 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/github-pages-deploy-action@4.1.5 - with: - branch: gh-pages - folder: mlr-org/docs - single-commit: false +# - name: Deploy +# if: ${{ github.event_name == 'push' }} +# uses: JamesIves/github-pages-deploy-action@4.1.5 +# with: +# branch: gh-pages +# folder: mlr-org/docs +# single-commit: false