-
Notifications
You must be signed in to change notification settings - Fork 1
70 lines (58 loc) · 1.93 KB
/
deploy_pkgdown.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
on:
workflow_dispatch:
push:
branches:
- dev
paths:
- 'vignettes/**'
- 'NEWS.md'
- 'README.md'
- 'DESCRIPTION'
- 'LICENSE'
- '_pkgdown.yml'
name: Deploy pkgdown
jobs:
build1:
runs-on: ubuntu-latest
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
R_REMOTES_NO_ERRORS_FROM_WARNINGS: true
steps:
- name: Checkout repo
uses: actions/checkout@v2
- name: Install Pandoc
run: brew install pandoc
shell: bash
- name: Install command line packages
run: |
sudo apt update
sudo apt-get install libgdal-dev libcurl4-gnutls-dev libgit2-dev libudunits2-dev libharfbuzz-dev libfribidi-dev
shell: bash
- name: Set up R
uses: r-lib/actions/setup-r
with:
r-version: '4.0.3' # problem with using 4.0.4
- name: Cache R packages
uses: actions/cache@v2
id: cache
with:
path: ${{ env.R_LIBS_USER }}
key: pkgdown-cache-05172021-AT
- name: Load R packages
if: steps.cache.outputs.cache-hit != 'true'
run: |
sudo R CMD javareconf
Rscript -e 'install.packages(c("pkgdown", "stringi", "car", "devtools"), dependencies = TRUE)
devtools::install_github("NOAA-EDAB/NEespShiny", ref = "v0.1.0", upgrade = "never")'
- name: Render pkgdown
run: |
Rscript -e 'install.packages("preferably")
pkgdown::build_site()'
- name: Deploy to Github
uses: JamesIves/[email protected]
with:
token: ${{ secrets.GITHUB_TOKEN }}
branch: gh-pages # The branch the action should deploy to.
folder: docs # The folder the action should deploy.
target-folder: docs
clean: false # Automatically remove deleted files from the deploy branch