Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use GitHub Pages #318

Draft
wants to merge 4 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 36 additions & 0 deletions .github/workflows/static.yml
Original file line number Diff line number Diff line change
@@ -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
11 changes: 6 additions & 5 deletions web/script.js
Original file line number Diff line number Diff line change
Expand Up @@ -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"};

Expand All @@ -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 += "<br><br>(Click for logs.)";
} else {
Expand Down Expand Up @@ -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) {
Expand All @@ -285,19 +286,19 @@
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) {
console.log("Received status: ", xhr.status);
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_", "");
Expand Down
Loading