diff --git a/.github/workflows/deploy.yaml b/.github/workflows/deploy.yaml new file mode 100644 index 0000000..2fc69ad --- /dev/null +++ b/.github/workflows/deploy.yaml @@ -0,0 +1,17 @@ +name: Deploy + +on: + workflow_dispatch: + +jobs: + deploy: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + repository: canleskis/particular + path: particular + + - name: Deploy Benchmarks + run: | + bash scripts/deploy_benchmarks.sh website/content/benchmarks diff --git a/scripts/deploy_benchmarks.sh b/scripts/deploy_benchmarks.sh new file mode 100644 index 0000000..0a6097c --- /dev/null +++ b/scripts/deploy_benchmarks.sh @@ -0,0 +1,13 @@ +# Add all the benchmarks to a single json file in a list. + +out_dir=$1 +name=${2:-"benchmarks"} + +buffer="" + +for file in particular/benches/results/*-*-*.json; do + buffer+=$(cat "$file") + buffer+="," +done + +echo "[${buffer%?}]" > $out_dir/$name.json