Skip to content

Commit eaeea39

Browse files
committed
add _pkgdown.yml and .github/workflows/pkgdown.yml GHA
0 parents  commit eaeea39

File tree

2 files changed

+71
-0
lines changed

2 files changed

+71
-0
lines changed

.github/workflows/pkgdown.yml

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
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
3+
on:
4+
push:
5+
paths:
6+
- '**.yml'
7+
branches:
8+
- pkgdown
9+
release:
10+
types: [published]
11+
workflow_dispatch:
12+
13+
name: pkgdown
14+
15+
jobs:
16+
pkgdown:
17+
runs-on: ubuntu-latest
18+
env:
19+
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
20+
steps:
21+
- uses: actions/checkout@v3
22+
with:
23+
ref: devel
24+
25+
- name: Copy .github and _pkgdown.yml
26+
run: |
27+
git config --global --add safe.directory /__w/${{ github.event.repository.name }}/${{ github.event.repository.name }}
28+
git fetch origin pkgdown
29+
git checkout origin/pkgdown -- .github
30+
git checkout origin/pkgdown -- _pkgdown.yml
31+
32+
- uses: r-lib/actions/setup-pandoc@v2
33+
34+
- uses: r-lib/actions/setup-r@v2
35+
with:
36+
use-public-rspm: true
37+
38+
- uses: r-lib/actions/setup-r-dependencies@v2
39+
with:
40+
extra-packages: any::pkgdown, local::.
41+
needs: website
42+
43+
- name: Build site
44+
run: pkgdown::build_site_github_pages(new_process = FALSE, install = FALSE)
45+
shell: Rscript {0}
46+
47+
- name: Upload pkgdown artifact
48+
uses: actions/upload-pages-artifact@v3
49+
with:
50+
path: docs
51+
52+
deploy:
53+
needs: pkgdown
54+
permissions:
55+
contents: write
56+
pages: write
57+
id-token: write
58+
runs-on: ubuntu-latest
59+
60+
steps:
61+
- name: Deploy to GitHub Pages
62+
id: deployment
63+
uses: actions/deploy-pages@v4
64+

_pkgdown.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
title: BiocManager
2+
url: https://bioconductor.github.io/BiocManager
3+
4+
template:
5+
bootstrap: 5
6+
params:
7+
bootswatch: flatly

0 commit comments

Comments
 (0)