Dummy #37
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 | |
uses: actions/checkout@v4 | |
- name: Setup OCaml | |
uses: ocaml/setup-ocaml@v2 | |
with: | |
ocaml-compiler: 5.0.0 | |
- name: Pin package | |
run: opam pin add -n . | |
- name: Install dependencies | |
run: opam depext -yt metrics | |
- name: Build | |
run: opam install . | |
- name: Test | |
run: opam exec dune test | |
- name: Download Liquidsoap data | |
run: git clone -b metrics https://github.com/savonet/liquidsoap.git /tmp/metrics | |
- name: Generate website | |
run: | | |
mkdir website | |
cp src/style.css website/ | |
- name: Generate metrics | |
run: | | |
opam exec -- metrics -i /tmp/metrics -o website/index.html | |
opam exec -- metrics -i /tmp/metrics -o website/main.html --branch main | |
- name: Upload website | |
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 to GitHub Pages | |
id: deployment | |
uses: actions/deploy-pages@v4 |