-
Notifications
You must be signed in to change notification settings - Fork 0
82 lines (67 loc) · 2.06 KB
/
build-deploy-rmd.yaml
File metadata and controls
82 lines (67 loc) · 2.06 KB
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
75
76
77
78
79
80
81
on:
push:
branches:
- master
pull_request:
branches:
- master
name: build-deploy-rmd
jobs:
build-deploy-rmd:
runs-on: ${{ matrix.config.os }}
name: ${{ matrix.config.os }} (${{ matrix.config.r }})
strategy:
fail-fast: false
matrix:
config:
- {os: macOS-latest, r: 'release'}
env:
R_REMOTES_NO_ERRORS_FROM_WARNINGS: true
RSPM: ${{ matrix.config.rspm }}
CRAN: ${{ matrix.config.cran }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
steps:
- name: Check out repo
uses: actions/checkout@v2
with:
submodules: true
- name: Set up R
uses: r-lib/actions/setup-r@master
with:
r-version: ${{ matrix.config.r }}
- name: Set up pandoc
uses: r-lib/actions/setup-pandoc@master
- name: Install dependencies
run: |
install.packages(c('remotes', 'dplyr', 'ggplot2', 'rmarkdown',
'knitr', 'ggrepel', 'tibble', 'ggcorrplot'),
Ncpu = 2L)
shell: Rscript {0}
- name: Session info
run: |
install.packages('sessioninfo', Ncpus = 2L)
options(width = 100)
pkgs <- installed.packages()[, "Package"]
sessioninfo::session_info(pkgs, include_base = TRUE)
shell: Rscript {0}
- name: Render site
run: |
rmarkdown::render(input = "pca-intro.Rmd", clean = FALSE)
shell: Rscript {0}
- name: Prepare files to deploy
run: |
mkdir _site
cp -r pca-intro_files pca-intro.html _site/
- name: Deploy 🚀
uses: JamesIves/github-pages-deploy-action@releases/v3
with:
ACCESS_TOKEN: ${{ secrets.GITHUB_TOKEN }}
BRANCH: gh-pages
FOLDER: _site
- name: Upload check results
if: failure()
uses: actions/upload-artifact@master
with:
name: ${{ runner.os }}-r${{ matrix.config.r }}-results
path: check