Skip to content

Commit

Permalink
Merge pull request #266 from pbs-assess/fix/invalid-html5
Browse files Browse the repository at this point in the history
check html5 workflow
  • Loading branch information
seananderson committed Oct 18, 2023
2 parents 2439b65 + 8ba4be6 commit 3565572
Show file tree
Hide file tree
Showing 3 changed files with 51 additions and 3 deletions.
44 changes: 44 additions & 0 deletions .github/workflows/R-CMD-check-HTML5.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# 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]

name: HTML5 check

jobs:
HTML5-check:
runs-on: ubuntu-latest
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
R_KEEP_PKG_SOURCE: yes
steps:
- uses: actions/checkout@v3

- uses: r-lib/actions/setup-r@v2
with:
r-version: 'devel'
http-user-agent: 'release'
use-public-rspm: true

- uses: r-lib/actions/setup-r-dependencies@v2
with:
extra-packages: any::rcmdcheck
dependencies: 'character()'

- name: Install pdflatex
run: sudo apt-get install texlive-latex-base texlive-fonts-recommended texlive-fonts-extra texlive-latex-extra

- name: Install tidy
run: sudo apt install tidy

- uses: r-lib/actions/check-r-package@v2
with:
args: 'c("--as-cran", "--no-codoc", "--no-examples", "--no-tests", "--no-vignettes", "--no-build-vignettes", "--ignore-vignettes", "--no-install")'
build_args: 'c("--no-build-vignettes")'
error-on: '"note"'
env:
_R_CHECK_CRAN_INCOMING_REMOTE_: false
_R_CHECK_CRAN_INCOMING_: false
2 changes: 2 additions & 0 deletions .github/workflows/pkgdown.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ jobs:
run: |
remotes::install_github("pbs-assess/sdmTMBextra", dependencies = TRUE)
remotes::install_cran("cowplot")
remotes::install_cran("rnaturalearth")
remotes::install_cran("rnaturalearthdata")
shell: Rscript {0}

- name: Build site
Expand Down
8 changes: 5 additions & 3 deletions vignettes/web_only/pretty-plots.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@ vignette: >
```{r, include = FALSE}
sf_installed <- require("sf", quietly = TRUE)
ggplot_installed <- require("ggplot2", quietly = TRUE)
pkgs <- sf_installed && ggplot_installed
rnaturalearth_installed <- require("rnaturalearth", quietly = TRUE)
rnaturalearthdata_installed <- require("rnaturalearthdata", quietly = TRUE)
pkgs <- sf_installed && ggplot_installed && rnaturalearth_installed && rnaturalearthdata_installed
EVAL <- identical(Sys.getenv("NOT_CRAN"), "true") && pkgs
knitr::opts_chunk$set(
collapse = TRUE,
Expand All @@ -32,14 +34,14 @@ library(sdmTMB)
First, we will download coastline data for our region.
We will use a medium resolution version. For applied situations on finer scales, you may want to use `scale = "large"`.

```{r, eval=FALSE}
```{r}
map_data <- rnaturalearth::ne_countries(
scale = "medium",
returnclass = "sf", country = "canada")
# Crop the polygon for plotting and efficiency:
# st_bbox(map_data) # find the rough coordinates
bc_coast <- suppressWarnings(suppressMessages(
st_crop(map_data,
sf::st_crop(map_data,
c(xmin = -134, ymin = 46, xmax = -120, ymax = 57))))
```

Expand Down

0 comments on commit 3565572

Please sign in to comment.