From c78313f76dbb133e39dc8a10780f39fe29d31801 Mon Sep 17 00:00:00 2001 From: Simon Cruanes Date: Fri, 19 Jan 2024 08:51:19 -0500 Subject: [PATCH 1/4] add doc generation in CI --- .github/workflows/gh-pages.yml | 35 ++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 .github/workflows/gh-pages.yml diff --git a/.github/workflows/gh-pages.yml b/.github/workflows/gh-pages.yml new file mode 100644 index 0000000..74a19b3 --- /dev/null +++ b/.github/workflows/gh-pages.yml @@ -0,0 +1,35 @@ +name: github pages + +on: + push: + branches: + - main # Set a branch name to trigger deployment + pull_request: + +jobs: + deploy: + name: Deploy doc + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@main + + - name: Use OCaml + uses: ocaml/setup-ocaml@v2 + with: + ocaml-compiler: '5.0.x' + allow-prerelease-opam: true + dune-cache: true + + - name: Deps + run: opam install odig trace trace-tef trace-fuchsia ppx_trace + + - name: Build + run: opam exec -- odig odoc --cache-dir=_doc/ trace trace-tef trace-fuchsia ppx_trace + + - name: Deploy + uses: peaceiris/actions-gh-pages@v3 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + publish_dir: ./_doc/html + destination_dir: . + enable_jekyll: true From ecf51ce32b4a6fdc038383c1f8b0910055ee7e35 Mon Sep 17 00:00:00 2001 From: Simon Cruanes Date: Fri, 19 Jan 2024 09:09:06 -0500 Subject: [PATCH 2/4] CI: use odoc, not odig --- .github/workflows/gh-pages.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/gh-pages.yml b/.github/workflows/gh-pages.yml index 74a19b3..1f3e479 100644 --- a/.github/workflows/gh-pages.yml +++ b/.github/workflows/gh-pages.yml @@ -21,15 +21,15 @@ jobs: dune-cache: true - name: Deps - run: opam install odig trace trace-tef trace-fuchsia ppx_trace + run: opam install trace trace-tef trace-fuchsia ppx_trace -d - name: Build - run: opam exec -- odig odoc --cache-dir=_doc/ trace trace-tef trace-fuchsia ppx_trace + run: opam exec -- dune build @doc - name: Deploy uses: peaceiris/actions-gh-pages@v3 with: github_token: ${{ secrets.GITHUB_TOKEN }} - publish_dir: ./_doc/html + publish_dir: ./_build/default/_doc/_html/ destination_dir: . enable_jekyll: true From 7e087ffc549ea50bb0a8943cd52a74f384fcb9d3 Mon Sep 17 00:00:00 2001 From: Simon Cruanes Date: Fri, 19 Jan 2024 09:27:28 -0500 Subject: [PATCH 3/4] more CI --- .github/workflows/gh-pages.yml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/gh-pages.yml b/.github/workflows/gh-pages.yml index 1f3e479..71d6d7c 100644 --- a/.github/workflows/gh-pages.yml +++ b/.github/workflows/gh-pages.yml @@ -20,16 +20,18 @@ jobs: allow-prerelease-opam: true dune-cache: true + - run: opam pin odoc 2.2.2 -y -n + # crash with 2.4, see https://github.com/ocaml/odoc/issues/1066 - name: Deps - run: opam install trace trace-tef trace-fuchsia ppx_trace -d + run: opam install odig trace trace-tef trace-fuchsia ppx_trace - name: Build - run: opam exec -- dune build @doc + run: opam exec -- odig odoc --cache-dir=_doc/ trace trace-tef trace-fuchsia ppx_trace - name: Deploy uses: peaceiris/actions-gh-pages@v3 with: github_token: ${{ secrets.GITHUB_TOKEN }} - publish_dir: ./_build/default/_doc/_html/ + publish_dir: ./_doc/html destination_dir: . enable_jekyll: true From aa1b43be434e37341e85ebd186d22f444eb34666 Mon Sep 17 00:00:00 2001 From: Simon Cruanes Date: Fri, 19 Jan 2024 09:44:07 -0500 Subject: [PATCH 4/4] odoc again --- .github/workflows/gh-pages.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/gh-pages.yml b/.github/workflows/gh-pages.yml index 71d6d7c..30b1dae 100644 --- a/.github/workflows/gh-pages.yml +++ b/.github/workflows/gh-pages.yml @@ -23,15 +23,15 @@ jobs: - run: opam pin odoc 2.2.2 -y -n # crash with 2.4, see https://github.com/ocaml/odoc/issues/1066 - name: Deps - run: opam install odig trace trace-tef trace-fuchsia ppx_trace + run: opam install trace trace-tef trace-fuchsia ppx_trace -d - name: Build - run: opam exec -- odig odoc --cache-dir=_doc/ trace trace-tef trace-fuchsia ppx_trace + run: opam exec -- dune build @doc - name: Deploy uses: peaceiris/actions-gh-pages@v3 with: github_token: ${{ secrets.GITHUB_TOKEN }} - publish_dir: ./_doc/html + publish_dir: ./_build/default/_doc/_html/ destination_dir: . enable_jekyll: true