Install NanumGothic font #101
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
# 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 | |
on: | |
push: | |
branches: [main, master, v2] | |
pull_request: | |
branches: [main, master, v2] | |
workflow_dispatch: | |
name: bookdown | |
jobs: | |
bookdown: | |
runs-on: ubuntu-latest | |
# Only restrict concurrency for non-PR jobs | |
concurrency: | |
group: pkgdown-${{ github.event_name != 'pull_request' || github.run_id }} | |
env: | |
GITHUB_PAT: ${{ secrets.GITHUB_PAT }} | |
EMAIL: ${{ secrets.EMAIL }} | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: r-lib/actions/setup-pandoc@v2 | |
- uses: r-lib/actions/setup-r@v2 | |
with: | |
use-public-rspm: true | |
# Install tinytex and LaTeX packages | |
- name: Install tinytex | |
run: | | |
R -e 'install.packages("tinytex"); tinytex::install_tinytex()' | |
R -e 'tinytex::tlmgr_install(c("xetex", "fontspec", "xunicode", "geometry", "fancyhdr", "titlesec", "titling", "tocloft", "sectsty", "environ", "trimspaces", "wrapfig", "multirow", "colortbl", "tabularx", "varwidth", "footnote", "threeparttable", "enumitem", "footmisc", "fncychap", "hyphenat", "biblatex", "biber"))' | |
shell: bash | |
# Install Inconsolata font for LaTeX | |
- name: Install Inconsolata font | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y fonts-inconsolata | |
# Install NanumGothic font for LaTeX | |
- name: Install NanumGothic font | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y fonts-nanum | |
sudo fc-cache -fv | |
shell: bash | |
# Manually install tidymodels/infer with retry logic | |
- name: Manually install tidymodels/infer | |
run: | | |
R -e 'for (i in 1:5) { tryCatch(remotes::install_github("tidymodels/infer"), error = function(e) Sys.sleep(30)) }' | |
env: | |
GITHUB_PAT: ${{ secrets.GITHUB_PAT }} | |
# Manually install haozhu233/kableExtra with retry logic | |
- name: Manually install haozhu233/kableExtra with retry logic | |
run: | | |
R -e 'for (i in 1:5) { tryCatch(remotes::install_github("haozhu233/kableExtra"), error = function(e) Sys.sleep(30)) }' | |
env: | |
GITHUB_PAT: ${{ secrets.GITHUB_PAT }} | |
# Set up Rosetta 2 for Apple Silicon (ARM-based macOS) | |
- name: Install Rosetta 2 | |
if: runner.os == 'macOS' && matrix.os == 'macos-latest' | |
run: | | |
softwareupdate --install-rosetta --agree-to-license | |
# Set compiler flags for ragg | |
- name: Set compiler flags | |
run: | | |
R -e 'Sys.setenv(PKG_CFLAGS = "-std=c++17")' | |
- uses: r-lib/actions/setup-renv@v2 | |
- name: Cache bookdown results | |
uses: actions/cache@v3 | |
with: | |
path: _bookdown_files | |
key: bookdown-${{ hashFiles('**/*Rmd') }} | |
restore-keys: bookdown- | |
- name: Build site | |
run: bookdown::render_book("index.Rmd", quiet = TRUE) | |
shell: Rscript {0} | |
# Deploy to gh-pages if on main or master branch | |
- name: Deploy to GitHub pages 🚀 | |
if: github.event_name != 'pull_request' && (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/master') | |
uses: JamesIves/[email protected] | |
with: | |
branch: gh-pages | |
folder: docs | |
# Deploy to v2-publish if on v2 branch | |
- name: Deploy to v2-publish branch 🚀 | |
if: github.event_name != 'pull_request' && github.ref == 'refs/heads/v2' | |
uses: JamesIves/[email protected] | |
with: | |
branch: v2-publish | |
folder: docs |