Skip to content

Fix YAML (missing space) #33

Fix YAML (missing space)

Fix YAML (missing space) #33

Workflow file for this run

# Workflow derived from https://github.com/r-lib/actions/tree/master/examples
# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help
on:
push:
branches: [main, master]
pull_request:
branches: [main, master]
name: Build Hugo
jobs:
blogdown:
runs-on: ubuntu-latest
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v2
- uses: r-lib/actions/setup-pandoc@v2
- uses: r-lib/actions/setup-r@v2
with:
use-public-rspm: true
- name: Install R packages
run: |
install.packages(c("rmarkdown", "blogdown"))
shell: Rscript {0}
- name: Install hugo
run: |
R -e 'blogdown::install_hugo(extended = TRUE, version = "0.81.0")'
- name: Build site
run: |
R -e 'blogdown::hugo_build(local = FALSE)'
- name: Deploy to Netlify
env:
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }}
run: |
if [ github.event_name == 'pull_request' ]; then
echo "Running netlify preview deploy"
netlify deploy
else
echo "Running netlify production deploy"
netlify deploy --prod
fi