Update GitHub Actions workflows

Signed-off-by: Sora Morimoto <sora@morimoto.io>
This commit is contained in:
Sora Morimoto 2022-04-19 11:42:02 +09:00 committed by Simon Cruanes
parent c8d89e24be
commit a3f27bd3cb
3 changed files with 14 additions and 31 deletions

View file

@ -3,41 +3,23 @@ name: github pages
on: on:
push: push:
branches: branches:
- master # Set a branch name to trigger deployment - master
jobs: jobs:
deploy: deploy:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@main - name: Checkout code
uses: actions/checkout@v3
- name: Cache opam - name: Use OCaml 4.14.x
id: cache-opam uses: ocaml/setup-ocaml@v2
uses: actions/cache@v2
with: with:
path: ~/.opam ocaml-compiler: 4.14.x
key: opam-ubuntu-latest-4.12.0 dune-cache: true
- uses: avsm/setup-ocaml@v1 - name: Deploy odoc to GitHub Pages
uses: ocaml/setup-ocaml/deploy-doc@v2
with: with:
ocaml-version: '4.12.0' destination-dir: dev
enable-jekyll: true
- name: Pin
run: opam pin -n .
- name: Depext
run: opam depext -yt tiny_httpd tiny_httpd_camlzip
- name: Deps
run: opam install -d . --deps-only
- name: Build
run: opam exec -- dune build @doc
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./_build/default/_doc/_html/
destination_dir: dev
enable_jekyll: true

View file

@ -18,13 +18,13 @@ jobs:
- windows-latest - windows-latest
ocaml-compiler: ocaml-compiler:
- 4.04.x - 4.04.x
- 4.13.x - 4.14.x
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}
steps: steps:
- name: Checkout code - name: Checkout code
uses: actions/checkout@v2 uses: actions/checkout@v3
- name: Use OCaml ${{ matrix.ocaml-compiler }} - name: Use OCaml ${{ matrix.ocaml-compiler }}
uses: ocaml/setup-ocaml@v2 uses: ocaml/setup-ocaml@v2

1
.gitignore vendored
View file

@ -1,4 +1,5 @@
.git .git
_build _build
_opam
*.install *.install
.merlin .merlin