Script to look at. #76
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
name: CI | |
on: [push] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Install packages | |
run: | | |
sudo apt-get -y update | |
sudo apt-get -y install pandoc pandoc-citeproc texlive texlive-fonts-extra imagemagick poppler-utils pdf2svg ocaml-nox ocaml-findlib libyojson-ocaml-dev dune | |
- name: Build pandoc filters | |
run: | | |
git clone https://github.com/smimram/ocaml-pandoc | |
cd ocaml-pandoc | |
dune build @install | |
sudo dune install -p pandoc-crossref | |
sudo dune install -p pandoc-include | |
- name: Build book | |
run: | | |
make | |
pdflatex book.tex | |
pdflatex book.tex | |
- name: Build cover | |
run: | | |
make -C cover | |
cp cover/cover.pdf . | |
cp cover/cover-ebook.jpg . | |
- name: Build ebook | |
run: make book.epub | |
- name: Upload artifacts | |
uses: actions/upload-artifact@v2 | |
with: | |
name: book | |
path: | | |
book.pdf | |
cover.pdf | |
book.epub | |
cover-ebook.jpg | |
- name: Generate pages | |
run: | | |
make site | |
cp book.pdf site/public | |
cp book.epub site/public | |
- name: Deploy pages | |
uses: peaceiris/actions-gh-pages@v3 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: ./site/public | |
- name: Test scripts | |
run: docker build . -f .github/docker/Dockerfile.build |