Skip to content

Instantly share code, notes, and snippets.

@lrnv
Created April 8, 2020 13:14
Show Gist options
  • Save lrnv/17f2c721f4ac30ce55ae335cb83b6639 to your computer and use it in GitHub Desktop.
Save lrnv/17f2c721f4ac30ce55ae335cb83b6639 to your computer and use it in GitHub Desktop.
on:
push:
branches:
- master
name: build_and_goto_gh_pages
jobs:
blogdown:
name: build_and_push_to_gh_pages
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: r-lib/actions/setup-r@v1
- uses: r-lib/actions/setup-pandoc@v1
- name: Install rmarkdown and blogdown
run: Rscript -e 'install.packages(c("rmarkdown","blogdown"))'
- name: Install Hugo
run: Rscript -e 'blogdown::install_hugo(extended = TRUE, version = "0.68.3")'
- name: Get themes
run: git submodule update --remote
- name: Look at files
run: Rscript -e 'dir()'
- name: Run hugo_build()
run: Rscript -e 'blogdown::hugo_build(local = FALSE)'
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./public
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment