generated from NEFSC/NEFSC-Template
-
Notifications
You must be signed in to change notification settings - Fork 0
45 lines (40 loc) · 1.1 KB
/
bookdown.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
# build bookdown
on:
push:
branches:
- main
pull_request:
branches:
- main
name: build-book
jobs:
build-book:
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: r-lib/actions/setup-pandoc@v2
- uses: r-lib/actions/setup-r@v2
with:
use-public-rspm: true
- name: Install R pkg linux dependencies
run: |
sudo apt update
sudo apt-get install libcurl4-openssl-dev libnetcdf-dev libudunits2-dev libgdal-dev libharfbuzz-dev libfribidi-dev
shell: bash
- name: Install bookdown
run: |
install.packages(c("bookdown", "downlit", "xml2", "sf", "leaflet", "purrr", "knitr"))
shell: Rscript {0}
- name: Build book
run: |
setwd("bookdown")
bookdown::render_book("index.Rmd", "all")
shell: Rscript {0}
- name: Deploy to gh-pages
uses: JamesIves/github-pages-deploy-action@v4
with:
BRANCH: gh-pages
FOLDER: bookdown/_book
CLEAN: true