Skip to content

Commit 44a7bbc

Browse files
committed
fixing pkgdown
1 parent b1bc38a commit 44a7bbc

File tree

1 file changed

+31
-31
lines changed

1 file changed

+31
-31
lines changed

.github/workflows/pkgdown.yaml

+31-31
Original file line numberDiff line numberDiff line change
@@ -1,48 +1,48 @@
1+
# Workflow derived from https://github.com/r-lib/actions/tree/v2/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
5+
branches: [main, master]
6+
pull_request:
7+
branches: [main, master]
8+
release:
9+
types: [published]
10+
workflow_dispatch:
611

712
name: pkgdown
813

914
jobs:
1015
pkgdown:
11-
runs-on: macOS-latest
16+
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 }}
1220
env:
1321
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
22+
permissions:
23+
contents: write
1424
steps:
15-
- uses: actions/checkout@v2
25+
- uses: actions/checkout@v3
1626

17-
- uses: r-lib/actions/setup-r@v1
27+
- uses: r-lib/actions/setup-pandoc@v2
1828

19-
- uses: r-lib/actions/setup-pandoc@v1
20-
21-
- name: Query dependencies
22-
run: |
23-
install.packages('remotes')
24-
saveRDS(remotes::dev_package_deps(dependencies = TRUE), ".github/depends.Rds", version = 2)
25-
writeLines(sprintf("R-%i.%i", getRversion()$major, getRversion()$minor), ".github/R-version")
26-
shell: Rscript {0}
29+
- uses: r-lib/actions/setup-r@v2
30+
with:
31+
use-public-rspm: true
2732

28-
- name: Cache R packages
29-
uses: actions/cache@v2
33+
- uses: r-lib/actions/setup-r-dependencies@v2
3034
with:
31-
path: ${{ env.R_LIBS_USER }}
32-
key: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1-${{ hashFiles('.github/depends.Rds') }}
33-
restore-keys: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1-
35+
extra-packages: any::pkgdown, local::.
36+
needs: website
3437

35-
- name: Install dependencies
36-
run: |
37-
remotes::install_deps(dependencies = TRUE)
38-
install.packages("pkgdown", type = "binary")
38+
- name: Build site
39+
run: pkgdown::build_site_github_pages(new_process = FALSE, install = FALSE)
3940
shell: Rscript {0}
4041

41-
- name: Install package
42-
run: R CMD INSTALL .
43-
44-
- name: Deploy package
45-
run: |
46-
git config --local user.email "[email protected]"
47-
git config --local user.name "GitHub Actions"
48-
Rscript -e 'pkgdown::deploy_to_branch(new_process = FALSE)'
42+
- name: Deploy to GitHub pages 🚀
43+
if: github.event_name != 'pull_request'
44+
uses: JamesIves/[email protected]
45+
with:
46+
clean: false
47+
branch: gh-pages
48+
folder: docs

0 commit comments

Comments
 (0)