File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree 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
22# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help
33on :
44 push :
55 branches : [main, master]
6+ pull_request :
7+ branches : [main, master]
68 release :
79 types : [published]
810 workflow_dispatch :
@@ -12,10 +14,15 @@ name: pkgdown
1214jobs :
1315 pkgdown :
1416 runs-on : ubuntu-latest
17+ # Only restrict concurrency for non-PR jobs
18+ concurrency :
19+ group : pkgdown-${{ github.event_name != 'pull_request' || github.run_id }}
1520 env :
1621 GITHUB_PAT : ${{ secrets.GITHUB_TOKEN }}
22+ permissions :
23+ contents : write
1724 steps :
18- - uses : actions/checkout@v2
25+ - uses : actions/checkout@v3
1926
2027 - uses : r-lib/actions/setup-pandoc@v2
2128
@@ -25,11 +32,17 @@ jobs:
2532
2633 - uses : r-lib/actions/setup-r-dependencies@v2
2734 with :
28- extra-packages : pkgdown
35+ extra-packages : any:: pkgdown, local::.
2936 needs : website
3037
31- - name : Deploy package
32- run : |
33- git config --local user.name "$GITHUB_ACTOR"
34- git config --local user.email "$GITHUB_ACTOR@users.noreply.github.com"
35- Rscript -e 'pkgdown::deploy_to_branch(new_process = FALSE)'
38+ - name : Build site
39+ run : pkgdown::build_site_github_pages(new_process = FALSE, install = FALSE)
40+ shell : Rscript {0}
41+
42+ - name : Deploy to GitHub pages 🚀
43+ if : github.event_name != 'pull_request'
44+ uses : JamesIves/github-pages-deploy-action@v4.4.1
45+ with :
46+ clean : false
47+ branch : gh-pages
48+ folder : docs
You can’t perform that action at this time.
0 commit comments