Skip to content
Open

V2 #379

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .Rprofile

This file was deleted.

99 changes: 99 additions & 0 deletions .github/workflows/deploy_bookdown_v2.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
on:
push:
branches:
- v2

env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}

name: renderbook

jobs:
bookdown:

name: Render-Book

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- uses: actions/cache@v1
with:
path: ~/.local/share/renv
key: ${{ runner.os }}-renv-${{ hashFiles('**/renv.lock') }}
restore-keys: |
${{ runner.os }}-renv-

- uses: r-lib/actions/setup-r@v2
with:
use-public-rspm: true
crayon.enabled: 'FALSE'
Ncpus: 4

- uses: r-lib/actions/setup-pandoc@v2

# - uses: r-lib/actions/setup-renv@v2

- name: Install tinytex
uses: r-lib/actions/setup-tinytex@v2

- name: Install sysreq
run: sudo apt update && sudo apt install -y gdal-bin git-core libcairo2-dev libgdal-dev libgeos-dev libgeos++-dev libgit2-dev libpng-dev libssh2-1-dev libssl-dev libudunits2-dev libxml2-dev make pandoc pandoc-citeproc zlib1g-dev libmagick++-dev libssl-dev libsasl2-dev

- name: Pulling hexmake
run: docker pull colinfay/hexmake

- uses: nanasess/setup-chromedriver@master

- name: Install rmarkdown, bookdown and sysfonts
run: Rscript -e 'install.packages(c("sysfonts", "rmarkdown","bookdown"), Ncpus = 4)'

# - name: Spell check
# run: Rscript before-build-spellcheck.R
# env:
# EMAIL: ${{ secrets.EMAIL }}
# GH_TOKEN: ${{ secrets.TOKEN }}

- name: Before build
run: Rscript prep.R

- name: Render Book
run: Rscript -e 'bookdown::render_book("index.Rmd", output_dir = "_site/v2")'

- name: Build redirect
run: Rscript redirect.R

- uses: actions/upload-artifact@v1
with:
name: _site
path: _site/

# Need to first create an empty gh-pages branch
# see https://pkgdown.r-lib.org/reference/deploy_site_github.html
# and also add secrets for a GITHUB_PAT and EMAIL to the repository
# gh-action from Cecilapp/GitHub-Pages-deploy
checkout-and-deploy:
runs-on: ubuntu-latest
needs: bookdown
steps:
- name: Checkout
uses: actions/checkout@master
- name: Download artifact
uses: actions/[email protected]
with:
# Artifact name
name: _site # optional
# Destination path
path: _site # optional
- name: Deploy to GitHub Pages
uses: Cecilapp/GitHub-Pages-deploy@v3
env:
GITHUB_TOKEN: ${{ secrets.TOKEN }}
with:
email: ${{ secrets.EMAIL }}
build_dir: _site # optional
cname: engineering-shiny.org # optional
jekyll: no # optional


2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,5 @@ _book/*
golex/
todoedit
_site/
engineering-production-grade-shiny-apps_files/
engineering-production-grade-shiny-apps_cache/
Loading