Skip to content

Commit 6c08f5a

Browse files
Update pkgdown.yaml
1 parent 1db0265 commit 6c08f5a

File tree

1 file changed

+29
-13
lines changed

1 file changed

+29
-13
lines changed

.github/workflows/pkgdown.yaml

Lines changed: 29 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,49 @@
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-
tags: ['*']
6+
pull_request:
7+
release:
8+
types: [published]
9+
workflow_dispatch:
710

8-
name: pkgdown
11+
name: pkgdown.yaml
12+
13+
permissions: read-all
914

1015
jobs:
1116
pkgdown:
1217
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 }}
1321
env:
1422
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
23+
permissions:
24+
contents: write
1525
steps:
16-
- uses: actions/checkout@v2
26+
- uses: actions/checkout@v4
1727

18-
- uses: r-lib/actions/setup-pandoc@v1
28+
- uses: r-lib/actions/setup-pandoc@v2
1929

20-
- uses: r-lib/actions/setup-r@v1
30+
- uses: r-lib/actions/setup-r@v2
2131
with:
2232
use-public-rspm: true
2333

24-
- uses: r-lib/actions/setup-r-dependencies@v1
34+
- uses: r-lib/actions/setup-r-dependencies@v2
2535
with:
26-
extra-packages: pkgdown
36+
extra-packages: any::pkgdown, local::.
2737
needs: website
2838

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+
uses: JamesIves/[email protected]
46+
with:
47+
clean: false
48+
branch: gh-pages
49+
folder: docs

0 commit comments

Comments
 (0)