Skip to content

Commit

Permalink
Build docs on github rather than locally
Browse files Browse the repository at this point in the history
  • Loading branch information
lukstafi committed Apr 23, 2024
1 parent e81bffd commit a9b3886
Show file tree
Hide file tree
Showing 3 changed files with 44 additions and 42 deletions.
43 changes: 43 additions & 0 deletions .github/workflows/gh-pages.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: github pages

on:
push:
branches:
- master # Set a branch name to trigger deployment

jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@main

- name: Cache opam
id: cache-opam
uses: actions/cache@v2
with:
path: ~/.opam
key: opam-ubuntu-latest-5.1.1

- uses: avsm/setup-ocaml@v1
with:
ocaml-version: '5.1.1'

- name: Pin
run: opam pin -n .

- name: Depext
run: opam depext -yt ocannl_npy arrayjit ocannl

- 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
42 changes: 0 additions & 42 deletions .github/workflows/static.yml

This file was deleted.

1 change: 1 addition & 0 deletions ocannl.opam
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ depends: [
"ppx_expect"
"ppx_minidebug" {>= "1.5"}
"odoc" {with-doc}
"md2mld" {with-doc}
]
build: [
["dune" "subst"] {dev}
Expand Down

0 comments on commit a9b3886

Please sign in to comment.