File tree Expand file tree Collapse file tree 1 file changed +29
-13
lines changed Expand file tree Collapse file tree 1 file changed +29
-13
lines changed Original file line number Diff line number Diff line change 1
- # Workflow derived from https://github.com/r-lib/actions/tree/master /examples
1
+ # Workflow derived from https://github.com/r-lib/actions/tree/v2 /examples
2
2
# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help
3
3
on :
4
4
push :
5
5
branches : [main, master]
6
- tags : ['*']
6
+ pull_request :
7
+ release :
8
+ types : [published]
9
+ workflow_dispatch :
7
10
8
- name : pkgdown
11
+ name : pkgdown.yaml
12
+
13
+ permissions : read-all
9
14
10
15
jobs :
11
16
pkgdown :
12
17
runs-on : ubuntu-latest
18
+ # Only restrict concurrency for non-PR jobs
19
+ concurrency :
20
+ group : pkgdown-${{ github.event_name != 'pull_request' || github.run_id }}
13
21
env :
14
22
GITHUB_PAT : ${{ secrets.GITHUB_TOKEN }}
23
+ permissions :
24
+ contents : write
15
25
steps :
16
- - uses : actions/checkout@v2
26
+ - uses : actions/checkout@v4
17
27
18
- - uses : r-lib/actions/setup-pandoc@v1
28
+ - uses : r-lib/actions/setup-pandoc@v2
19
29
20
- - uses : r-lib/actions/setup-r@v1
30
+ - uses : r-lib/actions/setup-r@v2
21
31
with :
22
32
use-public-rspm : true
23
33
24
- - uses : r-lib/actions/setup-r-dependencies@v1
34
+ - uses : r-lib/actions/setup-r-dependencies@v2
25
35
with :
26
- extra-packages : pkgdown
36
+ extra-packages : any:: pkgdown, local::.
27
37
needs : website
28
38
29
- - name : Deploy package
30
- run : |
31
- git config --local user.name "$GITHUB_ACTOR"
32
- git config --local user.email "[email protected] "
33
- Rscript -e 'pkgdown::deploy_to_branch(new_process = FALSE)'
39
+ - name : Build site
40
+ run : pkgdown::build_site_github_pages(new_process = FALSE, install = FALSE)
41
+ shell : Rscript {0}
42
+
43
+ - name : Deploy to GitHub pages 🚀
44
+ if : github.event_name != 'pull_request'
45
+
46
+ with :
47
+ clean : false
48
+ branch : gh-pages
49
+ folder : docs
You can’t perform that action at this time.
0 commit comments