Skip to content

Commit e6c1a7e

Browse files
committed
Add GitHub Actions workflow for pkgdown documentation
1 parent e314a5f commit e6c1a7e

File tree

1 file changed

+47
-0
lines changed

1 file changed

+47
-0
lines changed

.github/workflows/pkgdown.yml

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
on:
2+
push:
3+
branches: [main, master]
4+
pull_request:
5+
branches: [main, master]
6+
release:
7+
types: [published]
8+
workflow_dispatch:
9+
10+
name: pkgdown
11+
12+
jobs:
13+
pkgdown:
14+
runs-on: ubuntu-latest
15+
16+
env:
17+
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
18+
19+
permissions:
20+
contents: write
21+
22+
steps:
23+
- uses: actions/checkout@v4
24+
25+
- uses: r-lib/actions/setup-pandoc@v2
26+
27+
- uses: r-lib/actions/setup-r@v2
28+
with:
29+
use-public-rspm: true
30+
31+
- uses: r-lib/actions/setup-r-dependencies@v2
32+
with:
33+
extra-packages: any::pkgdown, local::.
34+
needs: website
35+
36+
- name: Build site
37+
run: pkgdown::build_site_github_pages(new_process = FALSE, install = FALSE)
38+
shell: Rscript {0}
39+
40+
- name: Deploy to GitHub pages 🚀
41+
if: github.event_name != 'pull_request'
42+
uses: JamesIves/github-pages-deploy-action@v4.6.8
43+
with:
44+
clean: false
45+
branch: gh-pages
46+
folder: docs
47+

0 commit comments

Comments
 (0)