Skip to content

Commit

Permalink
Update pkgdown.yaml
Browse files Browse the repository at this point in the history
  • Loading branch information
GegznaV committed Jul 28, 2022
1 parent edbb20b commit edb9475
Showing 1 changed file with 39 additions and 5 deletions.
44 changes: 39 additions & 5 deletions .github/workflows/pkgdown.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,16 +26,50 @@ jobs:
use-public-rspm: true
r-version: 'release'

- uses: r-lib/actions/setup-r-dependencies@v2
- name: Query dependencies
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}

- name: Cache R packages
uses: actions/cache@v2
with:
extra-packages: any::pkgdown, local::.
extra-repositories: https://mokymai.github.io/download/
needs: website
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 dependencies
run: |
remotes::install_cran(c("rmarkdown", "devtools", "pkgdown", "ps"))
remotes::install_deps(dependencies = TRUE)
shell: Rscript {0}

- name: Configure Git
run: |
git config --global user.email "[email protected]"
git config --global user.name "GitHub Actions"
- name: Roxygenize
# The vignettes will be built in step "Deploy package"
run: |
devtools::document(roclets = c('rd', 'collate', 'namespace'))
shell: Rscript {0}

- name: Commit documentation updates
run: |
git add --all
git commit -m 'Re-build documentation' || echo "No changes to commit"
git push origin || echo "No changes to commit (documentation)"
- name: Install package
run: R CMD INSTALL .

- name: Render README
run: Rscript -e 'rmarkdown::render("README.Rmd")'

- name: Commit (if README was changed)
- name: Commit README (if README was changed)
run: |
git commit README.md -m 'Re-build README.Rmd before pkgdown' || echo "No changes to commit (README)"
git push origin || echo "No changes to commit (README)"
Expand Down

0 comments on commit edb9475

Please sign in to comment.