Skip to content

Commit

Permalink
match current template code for render_site.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
MicheleTobias committed Apr 8, 2024
1 parent 6defca7 commit 9f35bb1
Showing 1 changed file with 3 additions and 42 deletions.
45 changes: 3 additions & 42 deletions .github/workflows/render_site.yml
Original file line number Diff line number Diff line change
@@ -1,47 +1,8 @@
# Adapted from https://github.com/r-lib/actions/blob/v2-branch/examples/bookdown.yaml
#
# Deployment app: https://github.com/JamesIves/github-pages-deploy-action

on:
push:
branches: [main, master]

name: bookdown

jobs:
bookdown:
runs-on: ubuntu-latest
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
permissions:
contents: write
steps:
- uses: actions/checkout@v3
- uses: r-lib/actions/setup-pandoc@v2
- uses: r-lib/actions/setup-r@v2
with:
use-public-rspm: true
- uses: r-lib/actions/setup-renv@v2

- name: Cache results
uses: actions/cache@v3
with:
path: docs
key: bookdown-${{ hashFiles('**/*Rmd') }}
restore-keys: bookdown-
#- uses: r-lib/actions/setup-renv@v2

- name: Install dependencies
run: install.packages("bookdown")
shell: Rscript {0}

- name: Build
run: bookdown::render_book("index.Rmd", output_dir="./docs")
shell: Rscript {0}

- name: Deploy
uses: JamesIves/github-pages-deploy-action@v4.4.1
with:
branch: master
folder: docs
target-folder: docs
clean: true
- name: Cache results
uses: actions/cache@v3

0 comments on commit 9f35bb1

Please sign in to comment.