-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
db73f22
commit b8d599a
Showing
1 changed file
with
48 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
name: Build pkgdown site | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
build-site: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
|
||
- name: Set up R | ||
uses: r-lib/actions/setup-r@v2 | ||
with: | ||
r-version: '4.2.0' | ||
|
||
- name: Install system dependencies | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get install -y libxml2-dev libssl-dev libcurl4-openssl-dev | ||
- name: Install R package dependencies | ||
run: | | ||
install.packages('remotes') | ||
remotes::install_deps(dependencies = TRUE) | ||
shell: Rscript {0} | ||
|
||
- name: Install pkgdown | ||
run: install.packages('pkgdown') | ||
shell: Rscript {0} | ||
|
||
- name: Build pkgdown site | ||
run: pkgdown::build_site() | ||
shell: Rscript {0} | ||
|
||
- name: Commit and push changes | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
run: | | ||
git config --global user.name 'github-actions[bot]' | ||
git config --global user.email 'github-actions[bot]@users.noreply.github.com' | ||
git add -A | ||
git commit -m 'Build pkgdown site [skip ci]' | ||
git push origin HEAD:${{ github.head_ref }} |