File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : Deploy to GitHub Pages
2+
3+ on :
4+ push :
5+ branches : [main]
6+ paths : ['output/**']
7+ workflow_dispatch :
8+
9+ permissions :
10+ contents : read
11+ pages : write
12+ id-token : write
13+
14+ concurrency :
15+ group : pages
16+ cancel-in-progress : true
17+
18+ jobs :
19+ build :
20+ runs-on : ubuntu-latest
21+ steps :
22+ - uses : actions/checkout@v4
23+
24+ - name : Prepare static files
25+ run : cp output/viewer.html output/index.html
26+
27+ - name : Upload artifact
28+ uses : actions/upload-pages-artifact@v3
29+ with :
30+ path : output/
31+
32+ - name : Deploy to GitHub Pages
33+ id : deployment
34+ uses : actions/deploy-pages@v4
Original file line number Diff line number Diff line change @@ -618,6 +618,16 @@ <h3>All Runs</h3>
618618 try { render ( parseCSV ( text ) ) ; } catch ( e ) { console . error ( e ) ; }
619619 } ) . catch ( ( ) => { } ) ;
620620}
621+
622+ // Auto-load results.csv when served from a web server (e.g. GitHub Pages)
623+ if ( ! csvUrl && window . location . protocol . startsWith ( 'http' ) ) {
624+ fetch ( 'results.csv' ) . then ( r => {
625+ if ( r . ok ) return r . text ( ) ;
626+ throw new Error ( 'Not found' ) ;
627+ } ) . then ( text => {
628+ try { render ( parseCSV ( text ) ) ; } catch ( e ) { console . error ( e ) ; }
629+ } ) . catch ( ( ) => { } ) ;
630+ }
621631</ script >
622632</ body >
623633</ html >
You can’t perform that action at this time.
0 commit comments