-
Notifications
You must be signed in to change notification settings - Fork 64
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update to latest GitHub Actions workflows
Fixes #225
- Loading branch information
Showing
4 changed files
with
104 additions
and
115 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
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,43 +1,33 @@ | ||
# Workflow derived from https://github.com/r-lib/actions/tree/master/examples | ||
# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help | ||
on: | ||
push: | ||
branches: master | ||
branches: [main, master] | ||
tags: ['*'] | ||
|
||
name: pkgdown | ||
|
||
jobs: | ||
pkgdown: | ||
runs-on: macOS-latest | ||
runs-on: ubuntu-latest | ||
env: | ||
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} | ||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- uses: r-lib/actions/setup-r@master | ||
- uses: r-lib/actions/setup-pandoc@v1 | ||
|
||
- uses: r-lib/actions/setup-pandoc@master | ||
|
||
- name: Query dependencies | ||
run: | | ||
install.packages('remotes') | ||
saveRDS(remotes::dev_package_deps(dependencies = TRUE), "depends.Rds", version = 2) | ||
shell: Rscript {0} | ||
|
||
- name: Cache R packages | ||
uses: actions/cache@v1 | ||
- uses: r-lib/actions/setup-r@v1 | ||
with: | ||
path: ${{ env.R_LIBS_USER }} | ||
key: macOS-r-3.6-${{ hashFiles('depends.Rds') }} | ||
restore-keys: macOS-r-3.6- | ||
use-public-rspm: true | ||
|
||
- name: Install dependencies | ||
run: | | ||
install.packages("remotes") | ||
remotes::install_deps(dependencies = TRUE) | ||
remotes::install_dev("pkgdown") | ||
remotes::install_github("tidyverse/tidytemplate") | ||
shell: Rscript {0} | ||
|
||
- name: Install package | ||
run: R CMD INSTALL . | ||
- uses: r-lib/actions/setup-r-dependencies@v1 | ||
with: | ||
extra-packages: pkgdown | ||
needs: website | ||
|
||
- name: Deploy package | ||
run: pkgdown::deploy_to_branch(new_process = FALSE) | ||
shell: Rscript {0} | ||
run: | | ||
git config --local user.name "$GITHUB_ACTOR" | ||
git config --local user.email "[email protected]" | ||
Rscript -e 'pkgdown::deploy_to_branch(new_process = FALSE)' |
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,52 +1,75 @@ | ||
# Workflow derived from https://github.com/r-lib/actions/tree/master/examples | ||
# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help | ||
on: | ||
issue_comment: | ||
types: [created] | ||
|
||
name: Commands | ||
|
||
jobs: | ||
document: | ||
if: startsWith(github.event.comment.body, '/document') | ||
name: document | ||
runs-on: macOS-latest | ||
runs-on: ubuntu-latest | ||
env: | ||
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: r-lib/actions/pr-fetch@master | ||
|
||
- uses: r-lib/actions/pr-fetch@v1 | ||
with: | ||
repo-token: ${{ secrets.GITHUB_TOKEN }} | ||
- uses: r-lib/actions/setup-r@master | ||
- name: Install dependencies | ||
run: Rscript -e 'install.packages(c("remotes", "roxygen2"))' -e 'remotes::install_deps(dependencies = TRUE)' | ||
|
||
- uses: r-lib/actions/setup-r@v1 | ||
with: | ||
use-public-rspm: true | ||
|
||
- uses: r-lib/actions/setup-r-dependencies@v1 | ||
with: | ||
extra-packages: roxygen2 | ||
|
||
- name: Document | ||
run: Rscript -e 'roxygen2::roxygenise()' | ||
|
||
- name: commit | ||
run: | | ||
git config --local user.name "$GITHUB_ACTOR" | ||
git config --local user.email "[email protected]" | ||
git add man/\* NAMESPACE | ||
git commit -m 'Document' | ||
- uses: r-lib/actions/pr-push@master | ||
- uses: r-lib/actions/pr-push@v1 | ||
with: | ||
repo-token: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
style: | ||
if: startsWith(github.event.comment.body, '/style') | ||
name: style | ||
runs-on: macOS-latest | ||
runs-on: ubuntu-latest | ||
env: | ||
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: r-lib/actions/pr-fetch@master | ||
|
||
- uses: r-lib/actions/pr-fetch@v1 | ||
with: | ||
repo-token: ${{ secrets.GITHUB_TOKEN }} | ||
- uses: r-lib/actions/setup-r@master | ||
|
||
- uses: r-lib/actions/setup-r@v1 | ||
|
||
- name: Install dependencies | ||
run: Rscript -e 'install.packages("styler")' | ||
|
||
- name: Style | ||
run: Rscript -e 'styler::style_pkg()' | ||
|
||
- name: commit | ||
run: | | ||
git config --local user.name "$GITHUB_ACTOR" | ||
git config --local user.email "[email protected]" | ||
git add \*.R | ||
git commit -m 'Style' | ||
- uses: r-lib/actions/pr-push@master | ||
- uses: r-lib/actions/pr-push@v1 | ||
with: | ||
repo-token: ${{ secrets.GITHUB_TOKEN }} | ||
# A mock job just to ensure we have a successful build status | ||
finish: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- run: true |
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