Arrow heads. #17
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@v3 | |
- 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 metrics | |
run: opam exec -- metrics -i /tmp/metrics -o metrics.html | |
- name: Generate website | |
run: | | |
mkdir website | |
cp src/metrics.css website/ | |
cp metrics.html website/index.html | |
- name: Upload website | |
uses: actions/upload-pages-artifact@v2 | |
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@v2 |