Show the CVXR logo in the sidebar (and as favicon) on every page #9
This file contains hidden or 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
| name: Render and Publish Book | |
| # Render the Quarto book on clean runners installing packages straight from | |
| # CRAN/P3M -- the same line attendees run -- so a green build proves the | |
| # tutorial reproduces off the author's macOS box. | |
| # | |
| # * ubuntu-latest : render AND deploy the HTML site to gh-pages | |
| # * macos-latest : render only (cross-platform check, no deploy) | |
| # * windows-latest : render only (cross-platform check, no deploy) | |
| # | |
| # ubuntu is the most different from the author's machine, so it catches the | |
| # most "works on my machine" drift; mac/Windows cover the OSes attendees | |
| # actually use. fail-fast is off so a red mac/Windows leg never blocks the | |
| # ubuntu deploy. | |
| on: | |
| push: | |
| branches: [master] | |
| workflow_dispatch: | |
| # Allow the built-in GITHUB_TOKEN to push the rendered site to gh-pages. | |
| permissions: | |
| contents: write | |
| # A newer push supersedes an in-progress run (does not cancel matrix legs of | |
| # the same run). | |
| concurrency: | |
| group: publish-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| build: | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: | |
| - ubuntu-latest | |
| - macos-latest | |
| - windows-latest | |
| steps: | |
| - name: Check out repository | |
| uses: actions/checkout@v4 | |
| - name: Set up Quarto | |
| uses: quarto-dev/quarto-actions/setup@v2 | |
| with: | |
| version: release | |
| - name: Set up R | |
| uses: r-lib/actions/setup-r@v2 | |
| with: | |
| r-version: release | |
| use-public-rspm: true | |
| - name: Install R package dependencies | |
| uses: r-lib/actions/setup-r-dependencies@v2 | |
| with: | |
| # The attendee install line is install.packages(c("CVXR","scip","Uno", | |
| # "sparsediff")); CVXR pulls clarabel/osqp/scs/highs automatically. The | |
| # rest are the helper packages the chapters library(). pak resolves any | |
| # required system libraries (e.g. gfortran for Uno's rmumps dependency). | |
| packages: | | |
| any::rmarkdown | |
| any::knitr | |
| any::CVXR | |
| any::scip | |
| any::Uno | |
| any::sparsediff | |
| any::ggplot2 | |
| any::tidyr | |
| any::glmnet | |
| any::nnls | |
| any::boot | |
| any::bench | |
| any::png | |
| any::RColorBrewer | |
| any::MASS | |
| any::Matrix | |
| - name: Render book (HTML) | |
| run: quarto render --to html | |
| # Deploy only from the Linux leg; mac/Windows are render-only checks. | |
| - name: Publish to gh-pages | |
| if: matrix.os == 'ubuntu-latest' | |
| uses: quarto-dev/quarto-actions/publish@v2 | |
| with: | |
| target: gh-pages | |
| render: false | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |