-
Notifications
You must be signed in to change notification settings - Fork 13
77 lines (65 loc) · 1.83 KB
/
Copy pathdocs.yaml
File metadata and controls
77 lines (65 loc) · 1.83 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
name: goFlux website
on:
push:
branches: [master]
paths:
- 'R/**'
- 'man/**'
- 'website/**'
- 'DESCRIPTION'
- 'NAMESPACE'
- '.github/workflows/docs.yaml'
workflow_dispatch:
release:
types: [published]
permissions:
contents: write
concurrency:
group: docs
cancel-in-progress: true
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: r-lib/actions/setup-r@v2
with:
use-public-rspm: true
- uses: quarto-dev/quarto-actions/setup@v2
with:
version: 1.10.18
- uses: r-lib/actions/setup-r-dependencies@v2
with:
extra-packages: |
local::.
any::devtools
any::downloadthis
any::dplyr
any::purrr
any::readxl
any::openxlsx
any::knitr
any::rmarkdown
cache: true
- name: Check man/ is in sync with R/ (document and diff)
run: |
Rscript -e 'devtools::document()'
git diff --exit-code -- man NAMESPACE
- name: Autodetect audit (fail if a documented function has no autodoc block)
run: Rscript website/scripts/audit_functions.R
- name: Render website
run: quarto render
working-directory: website
- name: Strip polyfill scripts from rendered site
run: |
grep -rl "polyfill" _site --include='*.html' | xargs -r sed -i '/polyfill/d'
if grep -r "polyfill" _site --include='*.html'; then
echo "ERROR: polyfill references still present in _site" >&2
exit 1
fi
working-directory: website
- uses: JamesIves/github-pages-deploy-action@v4
with:
folder: website/_site
branch: gh-pages
clean: true