Skip to content

Commit

Permalink
Merge pull request #16 from jporobicg/master
Browse files Browse the repository at this point in the history
updating yml and code
  • Loading branch information
jporobicg authored Oct 30, 2023
2 parents 47d305a + a834ad8 commit 54024ab
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 40 deletions.
57 changes: 18 additions & 39 deletions .github/workflows/pkgdown.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
2 changes: 1 addition & 1 deletion R/initGen.R
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ generate.vars.init <- function(grp.file, cum.depths, df.atts, ice_model) {
att.index <- c(att.index, indx)
}
if (df.grp$needsLight[grp]) { ## single light adaptation group
Variable <- c(Variable, paste("Light_Adaptn_", df.grp$Code[grp],
Variable <- c(Variable, paste("Light_Adaptn_", df.grp$code[grp],
sep = ""))
indx <- which(df.atts$name == "Light3D")
long_name <- c(long_name, paste("Light adaption of",
Expand Down

0 comments on commit 54024ab

Please sign in to comment.