Main workflow #1368
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: Main workflow | |
on: | |
pull_request: | |
push: | |
schedule: | |
# Prime the caches every Monday | |
- cron: 0 1 * * MON | |
jobs: | |
build: | |
strategy: | |
fail-fast: false | |
matrix: | |
os: | |
- ubuntu-latest | |
ocaml-compiler: | |
- 4.14.0 | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Install pandoc | |
run: sudo apt-get -y install pandoc | |
- name: Use OCaml ${{ matrix.ocaml-compiler }} | |
uses: ocaml/setup-ocaml@v2 | |
with: | |
ocaml-compiler: ${{ matrix.ocaml-compiler }} | |
dune-cache: false | |
- name: Install dune | |
run: opam install dune>=3.4.1 | |
- name: Build HTML book | |
run: opam exec -- dune build @site | |
- name: Deploy site | |
uses: peaceiris/actions-gh-pages@v3 | |
if: github.ref == 'refs/heads/master' && runner.os == 'Linux' | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: ./_build/default/static |