Skip to content

Commit b66524a

Browse files
authored
Merge pull request #34 from ocsigen/doc
Deploy odoc to GitHub Pages from GitHub Actions
2 parents e52c9d3 + 650f585 commit b66524a

File tree

1 file changed

+54
-0
lines changed

1 file changed

+54
-0
lines changed

.github/workflows/doc.yml

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
name: Deploy odoc to GitHub Pages
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
8+
permissions: read-all
9+
10+
concurrency:
11+
group: deploy-odoc
12+
cancel-in-progress: true
13+
14+
jobs:
15+
deploy-odoc:
16+
name: Deploy odoc to GitHub Pages
17+
18+
environment:
19+
name: github-pages
20+
url: ${{ steps.deployment.outputs.page_url }}
21+
22+
permissions:
23+
contents: read
24+
id-token: write
25+
pages: write
26+
27+
runs-on: ubuntu-latest
28+
29+
steps:
30+
- name: Checkout tree
31+
uses: actions/checkout@v4
32+
33+
- name: Set-up OCaml
34+
uses: ocaml/setup-ocaml@v3
35+
with:
36+
ocaml-compiler: 5
37+
38+
- name: Install dependencies
39+
run: opam install . --deps-only --with-doc
40+
41+
- name: Build documentation
42+
run: opam exec -- dune build @doc
43+
44+
- name: Set-up Pages
45+
uses: actions/configure-pages@v5
46+
47+
- name: Upload artifact
48+
uses: actions/upload-pages-artifact@v3
49+
with:
50+
path: _build/default/_doc/_html
51+
52+
- name: Deploy odoc to GitHub Pages
53+
id: deployment
54+
uses: actions/deploy-pages@v4

0 commit comments

Comments
 (0)