Update README.md #48
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
on: | |
push: | |
# Trigger only on pushes to the 'main' branch | |
branches: | |
- main | |
name: website | |
jobs: | |
website: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write # Ensure write access to the repository | |
steps: | |
# Check out the repository | |
- uses: actions/checkout@v3 | |
# Set up Pandoc | |
- uses: r-lib/actions/setup-pandoc@v2 | |
# Set up R (current stable version) and configure RSPM | |
- name: Set up R | |
uses: r-lib/actions/setup-r@v2 | |
with: | |
r-version: "release" | |
use-public-rspm: true | |
# Install R dependencies | |
- name: Set up R dependencies | |
uses: r-lib/actions/setup-r-dependencies@v2 | |
with: | |
extra-packages: any::pkgdown | |
# Deploy the website | |
- name: Create website in separate branch | |
env: | |
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} | |
run: | | |
git config user.name "github-actions" | |
git config user.email "41898282+github-actions[bot]@users.noreply.github.com" | |
Rscript -e 'pkgdown::deploy_to_branch(new_process = FALSE, clean = TRUE, install = TRUE, branch = "gh-pages")' |