-
Notifications
You must be signed in to change notification settings - Fork 2
74 lines (61 loc) · 2.36 KB
/
docker-renv-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
71
72
73
74
on:
push:
branches:
- main
- master
- dev
- test-docker-ci
- up-schema-prod
name: pkgdown-docker-renv
jobs:
pkgdown-docker-renv:
runs-on: ubuntu-latest
container: rocker/geospatial:4.3.0
env:
R_REMOTES_NO_ERRORS_FROM_WARNINGS: true
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
RENV_PATHS_ROOT: ~/.local/share/renv
steps:
- uses: actions/checkout@v2
- name: Install universe
run: |
sudo apt-get update
sudo apt install -y software-properties-common
sudo add-apt-repository -y "deb http://archive.ubuntu.com/ubuntu $(lsb_release -sc) universe"
sudo apt-get update
- uses: r-lib/actions/setup-pandoc@v2
- name: Cache packages
uses: actions/cache@v1
with:
path: ${{ env.RENV_PATHS_ROOT }}
key: ${{ runner.os }}-renv-${{ hashFiles('**/renv.lock') }}
restore-keys: |
${{ runner.os }}-renv-
# - uses: r-lib/actions/setup-r@v1
# with:
# use-public-rspm: true
#
# - uses: r-lib/actions/setup-r-dependencies@v1
# with:
# extra-packages: pkgdown
# needs: website
- name: Install system dependencies Linux
run: sudo apt-get update -qq && apt install -y libharfbuzz-dev libfribidi-dev libgit2-dev
- name: Restore packages
shell: Rscript {0}
run: |
if (!requireNamespace("renv", quietly = TRUE)) install.packages("renv")
renv::restore()
if (!requireNamespace("pkgdown", quietly = TRUE)) renv::install("pkgdown")
if (!requireNamespace("pkgload", quietly = TRUE)) renv::install("pkgload")
if (!requireNamespace("remotes", quietly = TRUE)) renv::install("remotes")
if (!requireNamespace("thinkrtemplate", quietly = TRUE)) remotes::install_github("ThinkR-open/thinkrtemplate")
# - name: Install package
# run: R CMD INSTALL .
- name: Deploy package
run: |
echo `pwd`
git config --global --add safe.directory /__w/diades.atlas/diades.atlas
git config --local user.name "$GITHUB_ACTOR"
git config --local user.email "[email protected]"
Rscript -e 'pkgload::load_all();pkgdown::deploy_to_branch(new_process = FALSE)'