Skip to content

Commit

Permalink
Create Build pkgdown site.yaml
Browse files Browse the repository at this point in the history
  • Loading branch information
SanderDevisscher committed Jul 19, 2024
1 parent db73f22 commit b8d599a
Showing 1 changed file with 48 additions and 0 deletions.
48 changes: 48 additions & 0 deletions .github/workflows/Build pkgdown site.yaml
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 }}

0 comments on commit b8d599a

Please sign in to comment.