-
Notifications
You must be signed in to change notification settings - Fork 0
79 lines (63 loc) · 2.61 KB
/
Copy pathpkgdown.yaml
File metadata and controls
79 lines (63 loc) · 2.61 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
on:
workflow_run:
workflows: ["Render, deploy site"]
types:
- completed
schedule:
# run every day at 11 PM
- cron: '0 23 * * *'
name: Build Pkgdown
jobs:
R-CMD-check:
runs-on: ${{ matrix.config.os }}
name: ${{ matrix.config.package }} ${{ matrix.config.os }} (${{ matrix.config.r }})
strategy:
max-parallel: 1
fail-fast: false
matrix:
config:
- {os: macOS-latest, r: 'release', package: 'declaredesign', branch: 'main'}
- {os: macOS-latest, r: 'release', package: 'fabricatr', branch: 'main'}
- {os: macOS-latest, r: 'release', package: 'randomizr', branch: 'main'}
- {os: macOS-latest, r: 'release', package: 'estimatr', branch: 'main'}
- {os: macOS-latest, r: 'release', package: 'rdss', branch: 'main'}
- {os: macOS-latest, r: 'release', package: 'designlibrary', branch: 'master'}
env:
R_REMOTES_NO_ERRORS_FROM_WARNINGS: true
RSPM: ${{ matrix.config.rspm }}
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
ABORT_ON_MISSING_TOPICS: FALSE
steps:
- uses: actions/checkout@v4
- uses: r-lib/actions/setup-r@v2
with:
r-version: ${{ matrix.config.r }}
http-user-agent: ${{ matrix.config.http-user-agent }}
- uses: r-lib/actions/setup-pandoc@v2
- name: Install packages
uses: r-lib/actions/setup-r-dependencies@v2
with:
cache: always
- name: Session info
run: |
options(width = 100)
pkgs <- installed.packages()[, "Package"]
sessioninfo::session_info(pkgs, include_base = TRUE)
shell: Rscript {0}
- name: Clone all DD packages
run: |
git clone -b ${{ matrix.config.branch }} https://github.com/DeclareDesign/${{ matrix.config.package }} pkg
- name: Search for dependences in docs
run: Rscript -e 'library(checkpoint); found_packages <- scan_project_files(".", scan_rnw_with_knitr = TRUE)$pkgs; if(length(found_packages[!found_packages%in% installed.packages()[, 1]]) > 0) install.packages(found_packages[!found_packages%in% installed.packages()[,1]], repos = "https://cran.r-project.org")'
- name: Build site
run: pkgdown::build_site(pkg = "pkg")
shell: Rscript {0}
- name: Push to gh-pages
if: github.ref == 'refs/heads/main'
uses: JamesIves/github-pages-deploy-action@v4.5.0
with:
token: ${{ secrets.GITHUB_TOKEN }}
branch: gh-pages
folder: 'pkg/docs'
target-folder: 'r/${{ matrix.config.package }}'
clean: true