diff --git a/.github/workflows/book-dev-weekly.yml b/.github/workflows/book-dev-weekly.yml new file mode 100644 index 000000000..7ee80a80a --- /dev/null +++ b/.github/workflows/book-dev-weekly.yml @@ -0,0 +1,65 @@ +on: + workflow_dispatch: + schedule: + - cron: "0 1 * * 1" # Monday at 01:00 UTC + +name: book-dev-weekly + +jobs: + book-weekly: + runs-on: ubuntu-latest + container: + image: mlrorgdocker/mlr3-book + env: + R_REMOTES_NO_ERRORS_FROM_WARNINGS: true + GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} + + strategy: + matrix: + fail-fast: false + config: + - {dev-package: 'mlr-org/mlr3'} + - {dev-package: 'mlr-org/mlr3learners'} + - {dev-package: 'mlr-org/mlr3tuning'} + - {dev-package: 'mlr-org/mlr3pipelines'} + + steps: + - uses: actions/checkout@v3 + + - name: Install dev versions + run: remotes::install_github(c('${{ matrix.config.dev-package }}')) + shell: Rscript {0} + + - name: Install headless chromium + run: quarto tools install chromium + + - name: Cache OpenML + uses: actions/cache@v4 + id: openml-cache + with: + path: book/openml + key: ${{ runner.os }}-openml-${{ hashFiles('./book/chapters/chapter11/large-scale_benchmarking.qmd') }}-${{hashFiles('./book/chapters/appendices/solutions_large-scale_benchmarking.qmd')}} + restore-keys: ${{ runner.os }}-openml- + + - name: Render book + run: quarto render book/ --cache-refresh --execute-debug + + - name: Add .lycheeignore + run: cp .lycheeignore book/_book/.lycheeignore + + - name: Deploy netlify preview + if: ${{ github.event_name == 'pull_request' }} + uses: mlr-org/actions/quarto-netlify-preview@v1.3.0 + with: + netlify_auth_token: ${{ secrets.NETLIFY_AUTH_TOKEN }} + netlify_site_id: ${{ secrets.NETLIFY_SITE_ID }} + github_token: ${{ secrets.GITHUB_TOKEN }} + path: book/_book + netlify_url: mlr3book.netlify.app + + - name: Upload pdf book + uses: actions/upload-artifact@v4 + with: + name: mlr3book + path: book/_book/Applied-Machine-Learning-Using-mlr3-in-R.pdf + retention-days: 1 diff --git a/.github/workflows/book-weekly.yml b/.github/workflows/book-weekly.yml index 70b9a8d2e..3f0d48e71 100644 --- a/.github/workflows/book-weekly.yml +++ b/.github/workflows/book-weekly.yml @@ -1,7 +1,7 @@ on: workflow_dispatch: schedule: - - cron: "0 13 * * 1" # Monday at 13:00 UTC + - cron: "0 1 * * 1" # Monday at 01:00 UTC name: book-weekly