fix(viewer): support decido 0.5 triangulation #340
Workflow file for this run
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
| # Workflow derived from https://github.com/r-lib/actions/tree/v2/examples | |
| # Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help | |
| on: | |
| push: | |
| branches: | |
| - main | |
| - master | |
| pull_request: | |
| branches: | |
| - main | |
| - master | |
| release: | |
| types: | |
| - published | |
| workflow_dispatch: | |
| name: pkgdown | |
| jobs: | |
| pkgdown: | |
| runs-on: ubuntu-latest | |
| env: | |
| GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} | |
| RGL_USE_NULL: true | |
| steps: | |
| - uses: actions/checkout@v2 | |
| - uses: r-lib/actions/setup-pandoc@v2 | |
| - uses: r-lib/actions/setup-r@v2 | |
| with: | |
| use-public-rspm: true | |
| - uses: r-lib/actions/setup-r-dependencies@v2 | |
| with: | |
| extra-packages: any::pkgdown, any::dplyr, any::ggplot2, local::. | |
| needs: website | |
| - name: Locate DuckDB extension cache | |
| id: duckdb-ext-cache | |
| run: | | |
| home <- tools::R_user_dir("duckdb", "data") | |
| dir <- file.path(home, "extensions") | |
| dir.create(dir, recursive = TRUE, showWarnings = FALSE) | |
| out <- Sys.getenv("GITHUB_OUTPUT") | |
| cat("path=", dir, "\n", file = out, append = TRUE, sep = "") | |
| cat("version=", as.character(utils::packageVersion("duckdb")), "\n", file = out, append = TRUE, sep = "") | |
| # DuckDB otherwise uses a per-session temp directory that callr subprocesses cannot share. | |
| cat("DUCKDB_R_HOME=", home, "\n", file = Sys.getenv("GITHUB_ENV"), append = TRUE, sep = "") | |
| shell: Rscript {0} | |
| - name: Restore DuckDB extension cache | |
| id: cache-duckdb-ext | |
| uses: actions/cache/restore@v4 | |
| with: | |
| path: ${{ steps.duckdb-ext-cache.outputs.path }} | |
| key: ${{ runner.os }}-${{ runner.arch }}-duckdb-ext-${{ steps.duckdb-ext-cache.outputs.version }}-sqlite-v1 | |
| - name: Restore EnergyPlus cache | |
| id: cache-eplus | |
| uses: actions/cache/restore@v4 | |
| with: | |
| path: ~/.local/EnergyPlus-* | |
| key: ${{ runner.os }}-energyplus-${{ hashFiles('R/constants.R') }}-latest-22.2 | |
| - name: Prepare EnergyPlus | |
| run: | | |
| latest <- get("LATEST_EPLUS_VER", asNamespace("eplusr")) | |
| versions <- c(latest, "22.2") | |
| for (ver in versions) { | |
| if (!eplusr::is_avail_eplus(ver)) eplusr::install_eplus(ver, local = TRUE) | |
| stopifnot(eplusr::is_avail_eplus(ver)) | |
| message("EnergyPlus ", ver, ": ", eplusr::eplus_config(ver)$dir) | |
| } | |
| shell: Rscript {0} | |
| - name: Install DuckDB SQLite extension | |
| run: | | |
| eplusr::install_duckdb_sqlite() | |
| shell: Rscript {0} | |
| - name: Save DuckDB extension cache | |
| if: steps.cache-duckdb-ext.outputs.cache-hit != 'true' | |
| continue-on-error: true | |
| uses: actions/cache/save@v4 | |
| with: | |
| path: ${{ steps.duckdb-ext-cache.outputs.path }} | |
| key: ${{ steps.cache-duckdb-ext.outputs.cache-primary-key }} | |
| - name: Save EnergyPlus cache | |
| if: steps.cache-eplus.outputs.cache-hit != 'true' | |
| uses: actions/cache/save@v4 | |
| with: | |
| path: ~/.local/EnergyPlus-* | |
| key: ${{ steps.cache-eplus.outputs.cache-primary-key }} | |
| - name: Deploy package | |
| if: github.event_name != 'pull_request' | |
| run: | | |
| git config --local user.name "$GITHUB_ACTOR" | |
| git config --local user.email "$GITHUB_ACTOR@users.noreply.github.com" | |
| Rscript -e 'pkgdown::deploy_to_branch(new_process = FALSE)' | |
| - name: Build site without deploying | |
| if: ${{ github.event_name == 'pull_request' && !contains(github.event.head_commit.message, '[skip-website]') }} | |
| run: | | |
| Rscript -e 'pkgdown::build_site(preview = FALSE, install = FALSE)' |