Skip to content

Commit f16aee1

Browse files
author
Robert Nuske
committed
updated github actions pkgdown
1 parent ecf94ae commit f16aee1

File tree

1 file changed

+16
-32
lines changed

1 file changed

+16
-32
lines changed

.github/workflows/pkgdown.yaml

+16-32
Original file line numberDiff line numberDiff line change
@@ -1,50 +1,34 @@
1+
# Workflow derived from https://github.com/r-lib/actions/tree/master/examples
2+
# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help
13
on:
24
push:
3-
branches:
4-
- main
5-
- master
6-
tags:
7-
-'*'
5+
branches: [main, master]
6+
release:
7+
types: [published]
8+
workflow_dispatch:
89

910
name: pkgdown
1011

1112
jobs:
1213
pkgdown:
13-
runs-on: macOS-latest
14+
runs-on: ubuntu-latest
1415
env:
1516
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
1617
steps:
1718
- uses: actions/checkout@v2
18-
- uses: r-lib/actions/setup-r@v1
19-
- uses: r-lib/actions/setup-tinytex@v1
2019
- uses: r-lib/actions/setup-pandoc@v1
21-
22-
- name: Query dependencies
23-
run: |
24-
install.packages('remotes')
25-
saveRDS(remotes::dev_package_deps(dependencies = TRUE), ".github/depends.Rds", version = 2)
26-
writeLines(sprintf("R-%i.%i", getRversion()$major, getRversion()$minor), ".github/R-version")
27-
shell: Rscript {0}
28-
29-
- name: Restore R package cache
30-
uses: actions/cache@v2
20+
- uses: r-lib/actions/setup-tinytex@v1
21+
- uses: r-lib/actions/setup-r@v1
3122
with:
32-
path: ${{ env.R_LIBS_USER }}
33-
key: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1-${{ hashFiles('.github/depends.Rds') }}
34-
restore-keys: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1-
23+
use-public-rspm: true
3524

36-
- name: Install dependencies
37-
run: |
38-
install.packages("pkgdown", type = "binary")
39-
install.packages("pdftools", type = "binary")
40-
remotes::install_deps(dependencies = TRUE)
41-
shell: Rscript {0}
42-
43-
- name: Install package
44-
run: R CMD INSTALL .
25+
- uses: r-lib/actions/setup-r-dependencies@v1
26+
with:
27+
extra-packages: [pkgdown, pdftools]
28+
needs: website
4529

4630
- name: Deploy package
4731
run: |
48-
git config --local user.email "actions@github.com"
49-
git config --local user.name "GitHub Actions"
32+
git config --local user.name "$GITHUB_ACTOR"
33+
git config --local user.email "$GITHUB_ACTOR@users.noreply.github.com"
5034
Rscript -e 'pkgdown::deploy_to_branch(new_process = FALSE)'

0 commit comments

Comments
 (0)