Newer here too. #189
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build | |
on: [push] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Install packages | |
run: sudo apt-get -y install ocaml ocaml-dune ocaml-odoc js-of-ocaml | |
- name: Install ppx_blob | |
run: | | |
cd /tmp | |
git clone https://github.com/johnwhitington/ppx_blob.git | |
cd ppx_blob | |
dune build @install | |
sudo dune install --prefix=/usr --libdir=`ocamlc -where` --verbose | |
- name: Build | |
run: make | |
- name: Test | |
run: make test | |
- name: Build doc | |
run: dune build @doc | |
- name: Build website | |
run: make -C web | |
- name: Generate webpages | |
run: | | |
mkdir website | |
cp -r _build/default/_doc/_html website/doc | |
cp _build/default/web/*.html _build/default/web/*.js _build/default/web/*.css website | |
- name: Upload website artifact | |
uses: actions/upload-pages-artifact@v3 | |
with: | |
path: website | |
deploy: | |
needs: build | |
permissions: | |
pages: write | |
id-token: write | |
environment: | |
name: github-pages | |
url: ${{ steps.deployment.outputs.page_url }} | |
runs-on: ubuntu-latest | |
steps: | |
- name: Deploy website | |
id: deployment | |
uses: actions/deploy-pages@v3 |