Pre-release fixes #178
Workflow file for this run
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
# Workflow derived from https://github.com/r-lib/actions/tree/v2/examples | |
# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help | |
# | |
# Reproduce locally by running: | |
# ```r | |
# pak::pak(c("any::pkgdown", "."), dependencies = "Config/Needs/website") | |
# pkgdown::build_site() | |
# ``` | |
on: | |
push: | |
branches: [main, master] | |
paths: | |
- 'README.Rmd' | |
- 'README.md' | |
- 'index.Rmd' | |
- 'index.md' | |
- 'man/**' | |
- 'vignettes/**' | |
- '_pkgdown.yml' | |
- 'pkgdown/**' | |
- 'DESCRIPTION' | |
- '.Rbuildignore' | |
- '.github/**' | |
pull_request: | |
paths: | |
- 'README.Rmd' | |
- 'README.md' | |
- 'index.Rmd' | |
- 'index.md' | |
- 'man/**' | |
- 'vignettes/**' | |
- '_pkgdown.yml' | |
- 'pkgdown/**' | |
- 'DESCRIPTION' | |
- '.Rbuildignore' | |
- '.github/**' | |
release: | |
types: [published] | |
workflow_dispatch: | |
name: pkgdown | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
pkgdown: | |
runs-on: ubuntu-latest | |
env: | |
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} | |
permissions: | |
contents: write | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: r-lib/actions/setup-pandoc@v2 | |
- uses: r-lib/actions/setup-r@v2 | |
with: | |
use-public-rspm: true | |
- uses: r-lib/actions/setup-r-dependencies@v2 | |
with: | |
extra-packages: any::pkgdown, local::. | |
needs: website | |
- name: Build site | |
run: pkgdown::build_site_github_pages(new_process = FALSE, install = FALSE) | |
shell: Rscript {0} | |
- name: Deploy to GitHub pages 🚀 | |
if: github.event_name != 'pull_request' | |
uses: JamesIves/[email protected] | |
with: | |
# We clean on releases because we want to remove old vignettes, | |
# figures, etc. that have been deleted from the `main` branch. | |
# But we clean ONLY on releases because we want to be able to keep | |
# both the 'stable' and 'dev' websites. | |
# Also discussed in https://github.com/r-lib/actions/issues/484 | |
clean: ${{ github.event_name == 'release' }} | |
branch: gh-pages | |
folder: docs |