Skip to content

Commit e5a667a

Browse files
authored
Merge pull request #17 from malcolmbarrett/update_pd_wf
`use_github_action("pkgdown")`
2 parents d1f4021 + 6ecc248 commit e5a667a

File tree

1 file changed

+21
-10
lines changed

1 file changed

+21
-10
lines changed

.github/workflows/pkgdown.yaml

Lines changed: 21 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
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
33
on:
44
push:
55
branches: [main, master]
6+
pull_request:
7+
branches: [main, master]
68
release:
79
types: [published]
810
workflow_dispatch:
@@ -12,24 +14,33 @@ name: pkgdown
1214
jobs:
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 }}
1722
steps:
18-
- uses: actions/checkout@v2
23+
- uses: actions/checkout@v3
1924

20-
- uses: r-lib/actions/setup-pandoc@v1
25+
- uses: r-lib/actions/setup-pandoc@v2
2126

2227
- uses: r-lib/actions/setup-r@v2
2328
with:
2429
use-public-rspm: true
2530

26-
- uses: r-lib/actions/setup-r-dependencies@v1
31+
- uses: r-lib/actions/setup-r-dependencies@v2
2732
with:
28-
extra-packages: pkgdown
33+
extra-packages: any::pkgdown, local::.
2934
needs: website
3035

31-
- name: Deploy package
32-
run: |
33-
git config --local user.name "$GITHUB_ACTOR"
34-
git config --local user.email "[email protected]"
35-
Rscript -e 'pkgdown::deploy_to_branch(new_process = FALSE)'
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/[email protected]
43+
with:
44+
clean: false
45+
branch: gh-pages
46+
folder: docs

0 commit comments

Comments
 (0)