update citation #27
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
name: build blogdown site and deploy on github pages | |
# trigger on push or PR to main | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
jobs: | |
blogdown: | |
runs-on: ubuntu-latest | |
steps: | |
# checkout code | |
- uses: actions/checkout@v2 | |
# set up pandoc | |
- uses: r-lib/actions/setup-pandoc@v2 | |
# set up R | |
- uses: r-lib/actions/setup-r@v2 | |
with: | |
use-public-rspm: true | |
# set up enviroment | |
# - uses: r-lib/actions/setup-renv@v1 | |
# install blogdown | |
- name: Install blogdown | |
run: Rscript -e 'install.packages("blogdown")' | |
# set up Hugo | |
- name: Install hugo | |
run: | | |
R -e 'blogdown::install_hugo("0.86.0")' | |
# build site | |
- name: Build site | |
run: | | |
R -e 'blogdown::build_site(TRUE)' | |
# use actions-gh-pages to deploy | |
# https://github.com/peaceiris/actions-gh-pages | |
- name: Deploy on gh-pages | |
uses: peaceiris/actions-gh-pages@v3 | |
with: | |
# GITHUB_TOKEN secret is set up automatically | |
github_token: ${{ secrets.DEPLOY_TOKEN }} | |
publish_dir: ./public |