use setup-pandoc in check action #10
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 | |
name: pkgdown | |
jobs: | |
pkgdown: | |
# shell needs to use login mode so conda env activation can work | |
defaults: | |
run: | |
shell: bash -l {0} | |
runs-on: ubuntu-20.04 | |
env: | |
RSPM: https://packagemanager.rstudio.com/cran/__linux__/focal/latest | |
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup conda | |
uses: conda-incubator/setup-miniconda@v2 | |
with: | |
activate-environment: my-env | |
- name: Update PATH env variable to include conda bin dir (Linux and MacOS) | |
run: echo "PATH=$PATH" >> $GITHUB_ENV | |
if: runner.os != 'Windows' | |
- name: Install osmium | |
run: conda install -c conda-forge osmium-tool | |
- uses: r-lib/actions/setup-pandoc@v2 | |
- uses: r-lib/actions/setup-r@v2 | |
- uses: r-lib/actions/setup-r-dependencies@v2 | |
with: | |
extra-packages: any::pkgdown, local::. | |
needs: website | |
- name: Build and deploy pkgdown site | |
run: | | |
git config --local user.name "$GITHUB_ACTOR" | |
git config --local user.email "[email protected]" | |
Rscript -e 'pkgdown::deploy_to_branch(new_process = FALSE)' |