Skip to content

Commit 653f6cc

Browse files
committed
updating github actions
1 parent fb25590 commit 653f6cc

File tree

2 files changed

+41
-22
lines changed

2 files changed

+41
-22
lines changed

.github/workflows/R-CMD-check.yaml

Lines changed: 15 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
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]
66
pull_request:
7-
branches: [main, master]
87

9-
name: R-CMD-check
8+
name: R-CMD-check.yaml
9+
10+
permissions: read-all
1011

1112
jobs:
1213
R-CMD-check:
@@ -18,7 +19,7 @@ jobs:
1819
fail-fast: false
1920
matrix:
2021
config:
21-
- {os: macOS-latest, r: 'release'}
22+
- {os: macos-latest, r: 'release'}
2223
- {os: windows-latest, r: 'release'}
2324
- {os: ubuntu-latest, r: 'devel', http-user-agent: 'release'}
2425
- {os: ubuntu-latest, r: 'release'}
@@ -29,18 +30,22 @@ jobs:
2930
R_KEEP_PKG_SOURCE: yes
3031

3132
steps:
32-
- uses: actions/checkout@v2
33+
- uses: actions/checkout@v4
3334

34-
- uses: r-lib/actions/setup-pandoc@v1
35+
- uses: r-lib/actions/setup-pandoc@v2
3536

36-
- uses: r-lib/actions/setup-r@v1
37+
- uses: r-lib/actions/setup-r@v2
3738
with:
3839
r-version: ${{ matrix.config.r }}
3940
http-user-agent: ${{ matrix.config.http-user-agent }}
4041
use-public-rspm: true
4142

42-
- uses: r-lib/actions/setup-r-dependencies@v1
43+
- uses: r-lib/actions/setup-r-dependencies@v2
4344
with:
44-
extra-packages: rcmdcheck
45+
extra-packages: any::rcmdcheck
46+
needs: check
4547

46-
- uses: r-lib/actions/check-r-package@v1
48+
- uses: r-lib/actions/check-r-package@v2
49+
with:
50+
upload-snapshots: true
51+
build_args: 'c("--no-manual","--compact-vignettes=gs+qpdf")'

.github/workflows/pkgdown.yaml

Lines changed: 26 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +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+
pull_request:
67
release:
78
types: [published]
89
workflow_dispatch:
910

10-
name: pkgdown
11+
name: pkgdown.yaml
12+
13+
permissions: read-all
1114

1215
jobs:
1316
pkgdown:
1417
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 }}
1521
env:
1622
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
23+
permissions:
24+
contents: write
1725
steps:
18-
- uses: actions/checkout@v2
26+
- uses: actions/checkout@v4
1927

20-
- uses: r-lib/actions/setup-pandoc@v1
28+
- uses: r-lib/actions/setup-pandoc@v2
2129

22-
- uses: r-lib/actions/setup-r@v1
30+
- uses: r-lib/actions/setup-r@v2
2331
with:
2432
use-public-rspm: true
2533

26-
- uses: r-lib/actions/setup-r-dependencies@v1
34+
- uses: r-lib/actions/setup-r-dependencies@v2
2735
with:
28-
extra-packages: pkgdown
36+
extra-packages: any::pkgdown, local::.
2937
needs: website
3038

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)'
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/github-pages-deploy-action@v4.5.0
46+
with:
47+
clean: false
48+
branch: gh-pages
49+
folder: docs

0 commit comments

Comments
 (0)