Merge pull request #44 from MD-Anderson-Bioinformatics/update_install… #22
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
on: | |
push: | |
branches: | |
- main | |
tags: | |
-'*' | |
workflow_dispatch: | |
name: Build documentation website | |
## | |
## This job: | |
## - re-renders the index.md file from index.Rmd, | |
## - builds pgkdown website | |
## - deploys pgkdown website | |
## | |
jobs: | |
build-pkgdown-site: | |
runs-on: macOS-latest | |
env: | |
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} | |
JAVA_VERSION: 11 | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: r-lib/actions/setup-pandoc@v2 | |
- uses: r-lib/actions/setup-r@v2 | |
with: | |
extra-repositories: "https://md-anderson-bioinformatics.r-universe.dev" | |
- uses: r-lib/actions/setup-r-dependencies@v2 | |
with: | |
extra-packages: any::pkgdown, local::. | |
needs: website | |
- name: Set up JDK for java ${{ env.JAVA_VERSION }} | |
uses: actions/setup-java@v3 | |
with: | |
java-version: "${{ env.JAVA_VERSION }}" | |
distribution: 'temurin' | |
- name: Render index.Rmd (landing page for website) | |
run: Rscript -e 'rmarkdown::render("index.Rmd", "md_document"); print(sessionInfo())' | |
- name: Deploy package | |
run: | | |
git config --local user.email "[email protected]" | |
git config --local user.name "GitHub Actions" | |
Rscript -e 'pkgdown::deploy_to_branch(new_process = FALSE)' |