Created
April 8, 2020 13:14
-
-
Save lrnv/17f2c721f4ac30ce55ae335cb83b6639 to your computer and use it in GitHub Desktop.
a github/workflows/build.yaml file to solve this question : https://stackoverflow.com/questions/61060920/r-blogdown-deploy-with-github-actions-on-gh-pages/61061727?noredirect=1#comment108088436_61061727
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: | |
- 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