-
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.
- Loading branch information
Showing
5 changed files
with
127 additions
and
303 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,63 @@ | ||
name: pkgdown | ||
|
||
on: | ||
repository_dispatch: | ||
types: [trigger-workflow-2] | ||
|
||
jobs: | ||
build-and-deploy: | ||
runs-on: ubuntu-latest | ||
container: jorainer/xcms_tutorials:latest | ||
steps: | ||
## Most of these steps are the same as the ones in | ||
## https://github.com/r-lib/actions/blob/master/examples/check-standard.yaml | ||
## If they update their steps, we will also need to update ours. | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Query dependencies | ||
run: | | ||
install.packages('remotes') | ||
# saveRDS(remotes::dev_package_deps(dependencies = TRUE), ".github/depends.Rds", version = 2) | ||
shell: Rscript {0} | ||
|
||
- name: Install rcmdcheck | ||
run: | | ||
install.packages('rcmdcheck') | ||
shell: Rscript {0} | ||
|
||
- name: Check | ||
env: | ||
_R_CHECK_CRAN_INCOMING_REMOTE_: false | ||
run: | | ||
service mariadb start | ||
Rscript -e "rcmdcheck::rcmdcheck(args = c('--no-manual'), error_on = 'error', check_dir = 'check')" | ||
shell: bash {0} | ||
|
||
- name: Install deploy dependencies | ||
run: | | ||
apt-get update | ||
apt-get -y install rsync | ||
- name: Install pkgdown | ||
if: github.ref == 'refs/heads/main' | ||
run: | | ||
install.packages('pkgdown') | ||
shell: Rscript {0} | ||
|
||
- name: Install package | ||
if: github.ref == 'refs/heads/main' | ||
run: R CMD INSTALL . | ||
|
||
- name: Deploy package | ||
if: github.ref == 'refs/heads/main' | ||
run: | | ||
git config --global user.email "[email protected]" | ||
git config --global user.name "GitHub Action" | ||
git config --global --add safe.directory /__w/xcmsTutorials/xcmsTutorials | ||
service mariadb start | ||
Rscript -e "pkgdown::deploy_to_branch(new_process = FALSE)" | ||
shell: bash {0} | ||
## Note that you need to run pkgdown::deploy_to_branch(new_process = FALSE) | ||
## at least one locally before this will work. This creates the gh-pages | ||
## branch (erasing anything you haven't version controlled!) and | ||
## makes the git history recognizable by pkgdown. |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.