-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #16 from jporobicg/master
updating yml and code
- Loading branch information
Showing
2 changed files
with
19 additions
and
40 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 |
---|---|---|
|
@@ -6,50 +6,29 @@ on: | |
- main | ||
- master | ||
|
||
|
||
jobs: | ||
pkgdown: | ||
runs-on: macOS-latest | ||
env: | ||
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} | ||
deploy: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- uses: r-lib/actions/setup-r@master | ||
|
||
- uses: r-lib/actions/setup-pandoc@master | ||
|
||
- name: Query dependencies | ||
- name: Install R | ||
run: | | ||
install.packages('remotes') | ||
saveRDS(remotes::dev_package_deps(dependencies = TRUE), ".github/depends.Rds", version = 2) | ||
writeLines(sprintf("R-%i.%i", getRversion()$major, getRversion()$minor), ".github/R-version") | ||
shell: Rscript {0} | ||
sudo apt-get update | ||
sudo apt-get install r-base | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
|
||
- name: Cache R packages | ||
uses: actions/cache@v2 | ||
with: | ||
path: ${{ env.R_LIBS_USER }} | ||
key: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1-${{ hashFiles('.github/depends.Rds') }} | ||
restore-keys: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1- | ||
|
||
|
||
- name: Install binary dependencies | ||
if: runner.os != 'Linux' | ||
run: | | ||
remotes::install_deps(dependencies = TRUE, type="binary") | ||
shell: Rscript {0} | ||
- name: Setup R | ||
uses: r-lib/actions/setup-r@v2 | ||
|
||
- name: Install pkgdown | ||
- name: Install dependencies | ||
run: | | ||
install.packages("pkgdown", type = "binary") | ||
shell: Rscript {0} | ||
|
||
- name: Install package | ||
run: R CMD INSTALL . | ||
Rscript -e "install.packages('remotes')" | ||
Rscript -e "remotes::install_deps(dependencies = TRUE)" | ||
Rscript -e "install.packages('pkgdown')" | ||
- name: Deploy package | ||
- name: Build and deploy | ||
run: | | ||
git config --local user.email "[email protected]" | ||
git config --local user.name "GitHub Actions" | ||
Rscript -e 'pkgdown::deploy_to_branch(new_process = FALSE)' | ||
Rscript -e "pkgdown::build_site()" | ||
bash deploy.sh | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
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