diff --git a/.github/workflows/static.yml b/.github/workflows/static.yml
new file mode 100644
index 00000000..9def6107
--- /dev/null
+++ b/.github/workflows/static.yml
@@ -0,0 +1,36 @@
+name: Deploy Website
+
+on:
+ push:
+ branches: ["master", "s3-setup"]
+ workflow_dispatch:
+
+permissions:
+ contents: read
+ pages: write
+ id-token: write
+
+# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
+# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
+concurrency:
+ group: "pages"
+ cancel-in-progress: false
+
+jobs:
+ deploy:
+ environment:
+ name: github-pages
+ url: ${{ steps.deployment.outputs.page_url }}
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout
+ uses: actions/checkout@v4
+ - name: Setup Pages
+ uses: actions/configure-pages@v3
+ - name: Upload artifact
+ uses: actions/upload-pages-artifact@v2
+ with:
+ path: './web/'
+ - name: Deploy to GitHub Pages
+ id: deployment
+ uses: actions/deploy-pages@v2
diff --git a/web/script.js b/web/script.js
index 4d2398a9..c7c2ea86 100644
--- a/web/script.js
+++ b/web/script.js
@@ -2,6 +2,7 @@
(function() {
"use strict";
+ const host = "https://quic-interop-runner.s3.us-east-005.backblazeb2.com";
const map = { client: {}, server: {}, test: {} };
const color_type = { succeeded: "success", unsupported: "secondary disabled", failed: "danger"};
@@ -24,7 +25,7 @@
a.className = "btn btn-xs btn-" + color_type[res] + " " + res + " test-" + text.toLowerCase();
var ttip_target = a;
if (res !== "unsupported") {
- a.href = "logs/" + log_dir + "/" + server + "_" + client + "/" + test;
+ a.href = `${host}/${log_dir}/${server}_${client}/${test}`;
a.target = "_blank";
ttip += "
(Click for logs.)";
} else {
@@ -272,7 +273,7 @@
document.getElementsByTagName("body")[0].classList.add("loading");
var xhr = new XMLHttpRequest();
xhr.responseType = 'json';
- xhr.open('GET', 'logs/' + dir + '/result.json');
+ xhr.open('GET', `${host}/${dir}/result.json`);
xhr.onreadystatechange = function() {
if(xhr.readyState !== XMLHttpRequest.DONE) return;
if(xhr.status !== 200) {
@@ -285,12 +286,10 @@
xhr.send();
}
- load("latest");
-
// enable loading of old runs
var xhr = new XMLHttpRequest();
xhr.responseType = 'json';
- xhr.open('GET', 'logs/logs.json');
+ xhr.open('GET', `${host}/logs.json`);
xhr.onreadystatechange = function() {
if(xhr.readyState !== XMLHttpRequest.DONE) return;
if(xhr.status !== 200) {
@@ -298,6 +297,8 @@
return;
}
var s = document.createElement("select");
+ // load the latest run
+ load(xhr.response[xhr.response.length-1]);
xhr.response.reverse().forEach(function(el) {
var opt = document.createElement("option");
opt.innerHTML = el.replace("logs_", "");