-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added the packagetemplete pkgdown workflows
- Loading branch information
1 parent
31508ec
commit c52e043
Showing
1 changed file
with
43 additions
and
6 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 |
---|---|---|
@@ -1,24 +1,56 @@ | ||
# 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: | ||
branches: [main, master] | ||
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 | ||
# Only restrict concurrency for non-PR jobs | ||
concurrency: | ||
group: pkgdown-${{ github.event_name != 'pull_request' || github.run_id }} | ||
env: | ||
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} | ||
permissions: | ||
contents: write | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
|
@@ -39,8 +71,13 @@ jobs: | |
|
||
- name: Deploy to GitHub pages 🚀 | ||
if: github.event_name != 'pull_request' | ||
uses: JamesIves/github-pages-deploy-action@v4.4.1 | ||
uses: JamesIves/[email protected].4 | ||
with: | ||
clean: false | ||
# 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 |