-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
create github workflows to check pkg and build site
- Loading branch information
Showing
6 changed files
with
266 additions
and
3 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 |
---|---|---|
@@ -0,0 +1,43 @@ | ||
# 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 | ||
on: | ||
push: | ||
branches: master | ||
pull_request: | ||
branches: master | ||
release: | ||
types: [published] | ||
workflow_dispatch: | ||
|
||
name: rcmdcheck | ||
|
||
jobs: | ||
rcmdcheck: | ||
runs-on: ubuntu-latest | ||
# Only restrict concurrency for non-PR jobs | ||
concurrency: | ||
group: rcmdcheck-${{ github.event_name != 'pull_request' }} | ||
cancel-in-progress: true | ||
env: | ||
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- uses: r-lib/actions/setup-r@v2 | ||
with: | ||
use-public-rspm: true | ||
|
||
- uses: r-lib/actions/setup-r-dependencies@v2 | ||
with: | ||
extra-packages: any::rcmdcheck | ||
needs: check | ||
|
||
- name: Run R-CMD-CHECK | ||
if: github.event_name != 'pull_request' | ||
uses: r-lib/actions/check-r-package@v2 | ||
with: | ||
args: 'c("--no-manual", "--as-cran", "--no-tests", "--no-examples")' | ||
env: | ||
_R_CHECK_FORCE_SUGGESTS_: false | ||
_R_CHECK_CRAN_INCOMING_REMOTE_: false | ||
DISPLAY: 99.0 |
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 |
---|---|---|
@@ -0,0 +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 | ||
on: | ||
push: | ||
branches: master | ||
paths: | ||
- '.github/workflows/document.yaml' | ||
- 'R/**' | ||
pull_request: | ||
branches: master | ||
release: | ||
types: [published] | ||
workflow_dispatch: | ||
|
||
name: document | ||
|
||
jobs: | ||
document: | ||
runs-on: ubuntu-latest | ||
# Only restrict concurrency for non-PR jobs | ||
concurrency: | ||
group: document-${{ github.event_name != 'pull_request' }} | ||
cancel-in-progress: true | ||
env: | ||
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} | ||
steps: | ||
- name: Checkout repo | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
token: ${{ secrets.GH_DOCS }} | ||
|
||
- name: Setup R | ||
uses: r-lib/actions/setup-r@v2 | ||
with: | ||
use-public-rspm: true | ||
|
||
- name: Install dependencies | ||
uses: r-lib/actions/setup-r-dependencies@v2 | ||
with: | ||
extra-packages: any::roxygen2 | ||
needs: roxygen2 | ||
|
||
- name: Document | ||
run: roxygen2::roxygenise() | ||
shell: Rscript {0} | ||
|
||
- name: Commit and push changes | ||
run: | | ||
git config --local user.name "$GITHUB_ACTOR" | ||
git config --local user.email "$GITHUB_ACTOR@users.noreply.github.com" | ||
git add man/\* NAMESPACE | ||
git commit -m "Update documentation" || echo "No changes to commit" | ||
git pull --ff-only | ||
git push origin master || echo "No changes to commit" | ||
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 |
---|---|---|
@@ -0,0 +1,63 @@ | ||
# 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 | ||
on: | ||
push: | ||
branches: master | ||
paths: | ||
- '.github/workflows/pkgdown.yaml' | ||
- 'vignettes/**' | ||
- 'man/**.Rd' | ||
- 'README.md' | ||
- 'DESCRIPTION' | ||
- 'LICENSE' | ||
- 'NEWS.md' | ||
- '_pkgdown.yml' | ||
pull_request: | ||
branches: master | ||
release: | ||
types: [published] | ||
workflow_dispatch: | ||
|
||
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages | ||
permissions: | ||
contents: read | ||
pages: write | ||
id-token: write | ||
|
||
name: pkgdown | ||
|
||
jobs: | ||
pkgdown: | ||
runs-on: ubuntu-latest | ||
# Only restrict concurrency for non-PR jobs | ||
concurrency: | ||
group: pkgdown-${{ github.event_name != 'pull_request' }} | ||
cancel-in-progress: true | ||
env: | ||
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} | ||
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/github-pages-deploy-action@v4.4.1 | ||
with: | ||
token: ${{ secrets.GH_DOCS }} | ||
branch: gh-pages | ||
folder: . | ||
clean: 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 |
---|---|---|
@@ -0,0 +1,52 @@ | ||
# 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 | ||
on: | ||
push: | ||
branches: master | ||
paths: | ||
- '.github/workflows/render-news-rmd.yaml' | ||
- 'NEWS.Rmd' | ||
pull_request: | ||
branches: master | ||
release: | ||
types: [published] | ||
workflow_dispatch: | ||
|
||
name: render-news-rmd | ||
|
||
jobs: | ||
render-news-rmd: | ||
runs-on: ubuntu-latest | ||
concurrency: | ||
group: news-${{ github.event_name != 'pull_request' }} | ||
cancel-in-progress: true | ||
env: | ||
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
token: ${{ secrets.GH_DOCS }} | ||
|
||
- 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::rmarkdown, local::. | ||
needs: render | ||
|
||
- name: Render NEWS | ||
run: Rscript -e 'rmarkdown::render("NEWS.Rmd", output_format="md_document")' | ||
|
||
- name: Commit rendered NEWS | ||
run: | | ||
git config --local user.name "$GITHUB_ACTOR" | ||
git config --local user.email "$GITHUB_ACTOR@users.noreply.github.com" | ||
git add NEWS.md | ||
git commit -m "Re-build NEWS.md" || echo "No changes to commit" | ||
git push origin master || echo "No changes to commit" | ||
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 |
---|---|---|
@@ -0,0 +1,52 @@ | ||
# 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 | ||
on: | ||
push: | ||
branches: master | ||
paths: | ||
- '.github/workflows/render-readme-rmd.yaml' | ||
- 'README.Rmd' | ||
pull_request: | ||
branches: master | ||
release: | ||
types: [published] | ||
workflow_dispatch: | ||
|
||
name: render-readme-rmd | ||
|
||
jobs: | ||
render-readme-rmd: | ||
runs-on: ubuntu-latest | ||
concurrency: | ||
group: readme-${{ github.event_name != 'pull_request' }} | ||
cancel-in-progress: true | ||
env: | ||
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
token: ${{ secrets.GH_DOCS }} | ||
|
||
- 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::rmarkdown, local::. | ||
needs: render | ||
|
||
- name: Render README | ||
run: Rscript -e 'rmarkdown::render("README.Rmd", output_format="md_document")' | ||
|
||
- name: Commit rendered README | ||
run: | | ||
git config --local user.name "$GITHUB_ACTOR" | ||
git config --local user.email "$GITHUB_ACTOR@users.noreply.github.com" | ||
git add README.md man/figures/README-* | ||
git commit -m "Re-build README.md" || echo "No changes to commit" | ||
git push origin master || echo "No changes to commit" | ||
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 |
---|---|---|
|
@@ -2,9 +2,6 @@ | |
.git | ||
.project | ||
|
||
# github actions | ||
.github | ||
|
||
# History files | ||
.Rhistory | ||
.Rapp.history | ||
|