pkgdown.yaml 1.37 KB
Newer Older
Laura A DeCicco's avatar
Laura A DeCicco committed
1
2
3
4
5
6
7
8
on:
  push:
    branches: master

name: pkgdown

jobs:
  pkgdown:
Laura A DeCicco's avatar
Laura A DeCicco committed
9
10
11
12
    runs-on: ubuntu-18.04
    env:
      RSPM: https://packagemanager.rstudio.com/cran/__linux__/bionic/latest
      
Laura A DeCicco's avatar
Laura A DeCicco committed
13
14
15
    steps:
      - uses: actions/checkout@v2

Laura A DeCicco's avatar
Laura A DeCicco committed
16
17
      - uses: r-lib/actions/setup-r@v1
        id: install-r
Laura A DeCicco's avatar
Laura A DeCicco committed
18

Laura A DeCicco's avatar
Laura A DeCicco committed
19
20
21
      - uses: r-lib/actions/setup-pandoc@v1
      
      - name: Install pak and query dependencies
Laura A DeCicco's avatar
Laura A DeCicco committed
22
        run: |
Laura A DeCicco's avatar
Laura A DeCicco committed
23
          install.packages("pak", repos = "https://r-lib.github.io/p/pak/dev/")
Laura A DeCicco's avatar
Laura A DeCicco committed
24
          install.packages(c("zoo", "maps", "patchwork"))
Laura A DeCicco's avatar
Laura A DeCicco committed
25
          saveRDS(pak::pkg_deps("local::.", dependencies = TRUE), ".github/r-depends.rds")
Laura A DeCicco's avatar
Laura A DeCicco committed
26
        shell: Rscript {0}
Laura A DeCicco's avatar
Laura A DeCicco committed
27
28
29
30
31
32
33
34
35
        
        
      - name: Install system dependencies
        if: runner.os == 'Linux'
        run: |
          pak::local_system_requirements(execute = TRUE)
          pak::pkg_system_requirements("pkgdown", execute = TRUE)
        shell: Rscript {0}
        
Laura A DeCicco's avatar
Laura A DeCicco committed
36
37
      - name: Install dependencies
        run: |
Laura A DeCicco's avatar
Laura A DeCicco committed
38
39
          pak::local_install_dev_deps(upgrade = TRUE, dependencies = c("all", "Config/Needs/website"))
          pak::pkg_install("pkgdown")
Laura A DeCicco's avatar
Laura A DeCicco committed
40
41
42
43
        shell: Rscript {0}

      - name: Install package
        run: R CMD INSTALL .
Laura A DeCicco's avatar
Laura A DeCicco committed
44
  
Laura A DeCicco's avatar
Laura A DeCicco committed
45
      - name: Deploy package
46
        run: |
47
          options(rmarkdown.html_vignette.check_title = FALSE)
48
          pkgdown::deploy_to_branch(new_process = FALSE)
Laura A DeCicco's avatar
Laura A DeCicco committed
49
        shell: Rscript {0}