Skip to content

Commit 11c4c90

Browse files
authored
ci: Build docs in CI (#157)
* ci: Build docs in CI * `devtools::document()` (GitHub Actions) * chore: use-public-rspm: true * fix: fix CI workflow triggers * fix: use branch name for concurrency group * chore: use Config/Needs/website * ci: Only one of push/pull_request runs * fix: config/needs/website syntax * chore: d3scatter from jcheng5/d3scatter * chore: fully clean site * chore: update to jsdoc2md v9 * fix: widgets.Rmd * refactor: Revert to jsdoc2md 4.0.1 * fix: use github actor for committer * ci(docs): Automated site build * Trigger CI; Add trailing blank line * ci: handle no changes gracefully * chore: undo all changes to filter.js * ci(docs): Automated site build --------- Co-authored-by: gadenbuie <gadenbuie@users.noreply.github.com>
1 parent a0da572 commit 11c4c90

File tree

162 files changed

+47617
-48506
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

162 files changed

+47617
-48506
lines changed

.github/workflows/build-docs.yml

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
name: Build Docs
2+
3+
on:
4+
workflow_dispatch:
5+
push:
6+
branches: ["main", "docs**"]
7+
pull_request:
8+
9+
permissions:
10+
contents: write
11+
12+
concurrency:
13+
group: build-site-${{ github.ref_name }}
14+
cancel-in-progress: true
15+
16+
jobs:
17+
build:
18+
runs-on: ubuntu-latest
19+
if: github.event_name != 'pull_request' || !startsWith(github.head_ref, 'docs')
20+
21+
steps:
22+
- name: Checkout repository
23+
uses: actions/checkout@v4
24+
25+
- name: Set up Node.js
26+
uses: actions/setup-node@v4
27+
with:
28+
node-version: 22 # jsdoc2md 4.0.1 doesn't work with node 23
29+
30+
- name: Install dependencies
31+
run: npm install
32+
33+
- name: Install pandoc
34+
uses: r-lib/actions/setup-pandoc@v2
35+
36+
- name: Setup R
37+
uses: r-lib/actions/setup-r@v2
38+
with:
39+
use-public-rspm: true
40+
41+
- name: Install R Dependencies
42+
uses: r-lib/actions/setup-r-dependencies@v2
43+
with:
44+
cache-version: 2
45+
extra-packages: |
46+
local::.
47+
needs: |
48+
website
49+
50+
- name: Render docs website
51+
working-directory: docs
52+
run: source build-site.sh
53+
54+
- name: Commit changes
55+
run: |
56+
git config --global user.name "$GITHUB_ACTOR"
57+
git config --global user.email "$GITHUB_ACTOR@users.noreply.github.com"
58+
git add docs/ && git commit -m "ci(docs): Automated site build" || echo "No doc changes"
59+
git push || echo "No doc updates to push"

DESCRIPTION

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,8 @@ Suggests:
4545
testthat (>= 2.1.0),
4646
sass,
4747
bslib
48+
Config/Needs/website: jcheng5/d3scatter, DT, leaflet, rmarkdown
4849
URL: https://rstudio.github.io/crosstalk/, https://github.com/rstudio/crosstalk
4950
BugReports: https://github.com/rstudio/crosstalk/issues
50-
RoxygenNote: 7.2.3
51+
RoxygenNote: 7.3.2
5152
Encoding: UTF-8

0 commit comments

Comments
 (0)