-
Notifications
You must be signed in to change notification settings - Fork 4
66 lines (55 loc) · 2.01 KB
/
deploy-toolkit.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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
# # Workflow derived from https://github.com/r-lib/actions/tree/v2/examples
# # Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help
---
name: Deploy Toolkit
on:
push:
branches: [main, master]
pull_request:
branches: [main, master]
release:
types: [published]
workflow_dispatch:
jobs:
deploy_toolkit:
runs-on: ubuntu-latest
# Only restrict concurrency for non-PR jobs
concurrency:
group: deploy-staging-${{ github.event_name != 'pull_request' || github.run_id }}
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
permissions:
contents: write
pages: write
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Set up R and Pandoc
uses: r-lib/actions/setup-pandoc@v2
with:
pandoc-version: 'latest'
- name: Set up R
uses: r-lib/actions/setup-r@v2
with:
use-public-rspm: true
- name: Install system dependencies
run: |
sudo apt-get install -y libudunits2-dev libgdal-dev
sudo apt-get install libmagick++-dev
- name: Install R packages
run: |
R -e 'install.packages(c("bookdown", "rmarkdown", "plotly", "shiny", "tidycensus", "tidyverse", "viridis", "ggmap", "ggplot2", "maps", "dplyr", "knitr", "latticeExtra", "pals", "classInt", "sf", "udunits2", "tmap", "lubridate", "gifski", "magick", "cowplot"))'
R -e 'if (!requireNamespace("BiocManager", quietly = TRUE)) install.packages("BiocManager"); BiocManager::install("Biobase")'
- name: Build site for staging branch
run: R -e 'bookdown::render_book(".", "bookdown::gitbook")'
- name: Debug Repository State
run: |
git status
ls -la
- name: Deploy to GitHub pages 🚀
if: github.event_name != 'pull_request'
uses: JamesIves/[email protected]
with:
clean: false
branch: gh-pages
folder: ./docs