-
Notifications
You must be signed in to change notification settings - Fork 12
57 lines (45 loc) · 1.3 KB
/
web-deploy.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
name: Deploy web
on:
push:
branches:
- 'release'
- 'develop'
jobs:
build:
strategy:
matrix:
ocaml-version:
- 4.14.x
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Use OCaml ${{ matrix.ocaml-version }}
uses: ocaml/setup-ocaml@v2
with:
ocaml-compiler: ${{ matrix.ocaml-version }}
cache-prefix: v2
- name: Setup yarn
uses: actions/setup-node@v3
with:
cache: 'yarn'
cache-dependency-path: 'web/yarn.lock'
- run: opam install . --deps-only --with-doc --with-test
- run: opam exec -- dune build
- run: cd web && yarn
- name: Deploy live version
run: opam exec -- make -C web minify
- name: Deploy docs (dev)
if: github.event_name == 'push' && github.ref_name == 'develop'
uses: JamesIves/github-pages-deploy-action@v4.3.4
with:
folder: _site
target-folder: dev
single-commit: true
- name: Deploy docs (release)
if: github.event_name == 'push' && github.ref_name == 'release'
uses: JamesIves/github-pages-deploy-action@v4.3.4
with:
folder: _site
target-folder: .
single-commit: true