-
Notifications
You must be signed in to change notification settings - Fork 6
48 lines (46 loc) · 1.7 KB
/
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
name: check and deploy
on:
push:
branches:
- master
tags-ignore:
- 'v*'
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: 3.x
- run: python3 -m pip install -r ./pip-requirements.txt
- uses: ocaml/setup-ocaml@v2
with:
ocaml-compiler: 5.1.1
dune-cache: false # can cause trouble when generating melange docs in step below: https://github.com/ocaml/dune/issues/7720
- name: Install all deps
run: make install
- name: Generate melange docs in ml syntax
run: opam reinstall -y melange --with-doc
- name: Copy melange docs in ml syntax
run: cp -r _opam/.opam-switch/build/melange.dev/_build/default/_doc/_html docs/api/ml
- name: Generate melange docs in re syntax
run: ODOC_SYNTAX="re" opam reinstall -y melange --with-doc
- name: Copy melange docs in re syntax
run: cp -r _opam/.opam-switch/build/melange.dev/_build/default/_doc/_html docs/api/re
- name: Run canonical script
run: opam exec -- dune exec add_canonical docs/api
- name: Check Reason syntax
run: make check-reason
- name: Check extracted code blocks
run: make check-extracted-code-blocks
- name: Run tests
run: make test
- name: Build playground
run: make build-playground
- name: Configure Git user
run: |
git config --local user.email "github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
- run: git fetch origin gh-pages --depth=1
- run: mike deploy --push unstable