Skip to content

Commit 17ca8f3

Browse files
authored
Merge pull request #76 from m-muecke/pkgdown
ci: update pkgdown pipeline and add enable bootstrap 5 and light switch
2 parents 7509f7d + 88ec4a9 commit 17ca8f3

File tree

2 files changed

+41
-33
lines changed

2 files changed

+41
-33
lines changed

.github/workflows/pkgdown.yaml

Lines changed: 35 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,48 +1,50 @@
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

7-
name: pkgdown
12+
name: pkgdown.yaml
13+
14+
permissions: read-all
815

916
jobs:
1017
pkgdown:
11-
runs-on: macOS-latest
18+
runs-on: ubuntu-latest
19+
# Only restrict concurrency for non-PR jobs
20+
concurrency:
21+
group: pkgdown-${{ github.event_name != 'pull_request' || github.run_id }}
1222
env:
1323
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
24+
permissions:
25+
contents: write
1426
steps:
15-
- uses: actions/checkout@v2
16-
17-
- uses: r-lib/actions/setup-r@v1
27+
- uses: actions/checkout@v4
1828

19-
- uses: r-lib/actions/setup-pandoc@v1
29+
- uses: r-lib/actions/setup-pandoc@v2
2030

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}
31+
- uses: r-lib/actions/setup-r@v2
32+
with:
33+
use-public-rspm: true
2734

28-
- name: Cache R packages
29-
uses: actions/cache@v2
35+
- uses: r-lib/actions/setup-r-dependencies@v2
3036
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-
34-
35-
- name: Install dependencies
36-
run: |
37-
remotes::install_deps(dependencies = TRUE)
38-
install.packages("pkgdown", type = "binary")
39-
shell: Rscript {0}
37+
extra-packages: any::pkgdown, local::.
38+
needs: website
4039

41-
- name: Install package
42-
run: R CMD INSTALL .
40+
- name: Build site
41+
run: pkgdown::build_site_github_pages(new_process = FALSE, install = FALSE)
42+
shell: Rscript {0}
4343

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)'
44+
- name: Deploy to GitHub pages 🚀
45+
if: github.event_name != 'pull_request'
46+
uses: JamesIves/[email protected]
47+
with:
48+
clean: false
49+
branch: gh-pages
50+
folder: docs

_pkgdown.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
url: https://s-fleck.github.io/lgr
2+
3+
template:
4+
bootstrap: 5
5+
light-switch: true
6+
17
reference:
28
- title: Logger
39
desc: Creates and dispatches LogEvents

0 commit comments

Comments
 (0)