From 9bbf338a8ad8b4cca6e6cc7c1bbf7bb19ede9f77 Mon Sep 17 00:00:00 2001 From: Sora Morimoto Date: Mon, 23 Dec 2024 17:11:42 +0900 Subject: [PATCH] _ Signed-off-by: Sora Morimoto --- .github/workflows/doc.yml | 54 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 .github/workflows/doc.yml diff --git a/.github/workflows/doc.yml b/.github/workflows/doc.yml new file mode 100644 index 0000000..40a9d9d --- /dev/null +++ b/.github/workflows/doc.yml @@ -0,0 +1,54 @@ +name: Deploy odoc to GitHub Pages + +on: + push: + # branches: + # - main + +permissions: read-all + +concurrency: + group: deploy-odoc + cancel-in-progress: true + +jobs: + deploy-odoc: + name: Deploy odoc to GitHub Pages + + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + + permissions: + contents: read + id-token: write + pages: write + + runs-on: ubuntu-latest + + steps: + - name: Checkout tree + uses: actions/checkout@v4 + + - name: Set-up OCaml + uses: ocaml/setup-ocaml@v3 + with: + ocaml-compiler: 5 + + - name: Install dependencies + run: opam install . --deps-only --with-doc + + - name: Build documentation + run: opam exec -- dune build @doc + + - name: Set-up Pages + uses: actions/configure-pages@v5 + + - name: Upload artifact + uses: actions/upload-pages-artifact@v3 + with: + path: _build/default/_doc/_html + + - name: Deploy odoc to GitHub Pages + id: deployment + uses: actions/deploy-pages@v4