From cc76e6fb93c16dafd17ce440dd61fca812aaca7e Mon Sep 17 00:00:00 2001 From: Canleskis <91223490+Canleskis@users.noreply.github.com> Date: Sun, 14 Jan 2024 22:11:01 +0100 Subject: [PATCH] Add deployment workflow --- .github/workflows/deploy.yaml | 16 ++++++++++++++++ scripts/deploy_benchmarks.sh | 13 +++++++++++++ 2 files changed, 29 insertions(+) create mode 100644 .github/workflows/deploy.yaml create mode 100644 scripts/deploy_benchmarks.sh diff --git a/.github/workflows/deploy.yaml b/.github/workflows/deploy.yaml new file mode 100644 index 0000000..4f9aee6 --- /dev/null +++ b/.github/workflows/deploy.yaml @@ -0,0 +1,16 @@ +name: Deploy + +on: + workflow_dispatch: + +jobs: + deploy: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + repository: canleskis/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