Skip to content

Commit 674e5fa

Browse files
authored
Merge pull request #172 from jmid/add-gh-pages-workflow
Add workflow to build gh-pages
2 parents aa32874 + f7d1002 commit 674e5fa

File tree

1 file changed

+43
-0
lines changed

1 file changed

+43
-0
lines changed

.github/workflows/gh-pages.yml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: github pages
2+
3+
on:
4+
push:
5+
branches:
6+
- main # Set a branch name to trigger deployment
7+
8+
jobs:
9+
deploy:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: Checkout code
13+
uses: actions/checkout@v2
14+
15+
- name: Cache opam
16+
id: cache-opam
17+
uses: actions/cache@v2
18+
with:
19+
path: ~/.opam
20+
key: opam-ubuntu-latest-5.0.0~beta1
21+
22+
- uses: avsm/setup-ocaml@v2
23+
with:
24+
ocaml-compiler: 'ocaml-base-compiler.5.0.0~beta1'
25+
default: https://github.com/ocaml/opam-repository.git
26+
alpha: https://github.com/kit-ty-kate/opam-alpha-repository.git
27+
28+
- name: Pin packages
29+
run: opam pin -n .
30+
31+
- name: Install dependencies
32+
run: opam install -d . --deps-only
33+
34+
- name: Build
35+
run: opam exec -- dune build @doc
36+
37+
- name: Deploy
38+
uses: peaceiris/actions-gh-pages@v3
39+
with:
40+
github_token: ${{ secrets.GITHUB_TOKEN }}
41+
publish_dir: ./_build/default/_doc/_html/
42+
destination_dir: dev
43+
enable_jekyll: true

0 commit comments

Comments
 (0)