Skip to content

Update about technology #13

Update about technology

Update about technology #13

Workflow file for this run

name: Build book
on:
push:
branches:
- main
jobs:
build-book:
runs-on: ubuntu-latest
env:
R_LIBS_USER: ~/R_libs:~/R:~/R-dev
QUARTO_VER: "1.6.1"
PANDOC_VER: "3.2"
# https://github.com/r-lib/remotes/issues/641
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
if: github.repository_owner == 'resampling-stats'
steps:
- uses: actions/checkout@v3
with:
submodules: true
- uses: actions/cache@v3
with:
path: ~/.cache/pip
key: ${{ hashFiles('build-requirements.txt') }}
- uses: actions/cache@v3
with:
path: |
~/R
~/R_libs
~/R-dev
key: ${{ hashFiles('scripts/install_r_requirements.R') }}
- name: Apt update
run: sudo apt update
- name: Install inkscape
run: |
sudo apt update
sudo apt install inkscape
- name: Install rsvg tools
run: sudo apt install librsvg2-bin
- name: PDF build packages
run: |
sudo apt install texlive-xetex texlive-fonts-extra
- name: Install quarto and matching pandoc
run: |
sudo apt install -y curl
curl -L https://github.com/quarto-dev/quarto-cli/releases/download/v${QUARTO_VER}/quarto-${QUARTO_VER}-linux-amd64.deb -o quarto.deb
# PANDOC appends -1 to the archive root name for .deb packages.
curl -L https://github.com/jgm/pandoc/releases/download/${PANDOC_VER}/pandoc-${PANDOC_VER}-1-amd64.deb -o pandoc.deb
sudo dpkg --install quarto.deb pandoc.deb
- uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: Install R
run: |
sudo apt install -y r-base libcurl4-openssl-dev libssl-dev libxml2-dev
R --version | grep 'version '
- name: Install R and Python libraries
run: |
sudo apt install -y libfontconfig1-dev libmagick++-dev
make build-init
- name: Build website index
run: cd website && make
- name: Deploy website index
uses: JamesIves/github-pages-deploy-action@v4.6.1
with:
folder: website
repository-name: resampling-stats/resampling-stats.github.io
branch: main
single-commit: true
token: ${{ secrets.BOOK_UPLOAD_TOKEN }}
- name: Build Python book
run: |
make python-book-jl
cp website/python-README.md python-book/README.md
cp requirements.txt python-book
touch python-book/.nojekyll
# - name: Build Python PDF
# run: cd source && ninja python-book-pdf
- name: Deploy Python book
uses: JamesIves/github-pages-deploy-action@v4.6.1
with:
folder: python-book
repository-name: resampling-stats/python-book
branch: main
single-commit: true
token: ${{ secrets.BOOK_UPLOAD_TOKEN }}
- name: Build R book
run: |
make r-book-jl
cp website/r-README.md r-book/README.md
touch r-book/.nojekyll
# - name: Build R PDF
# run: cd source && ninja python-book-pdf
- name: Deploy R book
uses: JamesIves/github-pages-deploy-action@v4.6.1
with:
folder: r-book
repository-name: resampling-stats/r-book
branch: main
single-commit: true
token: ${{ secrets.BOOK_UPLOAD_TOKEN }}