diff --git a/.github/workflows/pkgdown.yml b/.github/workflows/pkgdown.yml index b7de09e..80387fc 100644 --- a/.github/workflows/pkgdown.yml +++ b/.github/workflows/pkgdown.yml @@ -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 "actions@github.com" - 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 }} \ No newline at end of file diff --git a/R/initGen.R b/R/initGen.R index c3b1e84..1130a83 100755 --- a/R/initGen.R +++ b/R/initGen.R @@ -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",