Skip to content

Commit

Permalink
improve pages job
Browse files Browse the repository at this point in the history
  • Loading branch information
finn-tbd committed Nov 6, 2023
1 parent 743bd59 commit e9dac1f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
1 change: 1 addition & 0 deletions .github/workflows/pages.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,6 @@ jobs:
- uses: actions/setup-go@v4
- name: run for all SDKs
run: go run ./cmd/web5-spec-test many sdks/*
- uses: actions/upload-pages-artifact@v2
- name: deploy GitHub Pages
uses: actions/deploy-pages@v2
6 changes: 5 additions & 1 deletion cmd/web5-spec-test/test-many.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,11 @@ var (
fmt.Println()
}

if err := reports.WriteHTML(allReports, "report.html"); err != nil {
if err := os.MkdirAll("_site", 0755); err != nil && err != os.ErrExist {
slog.Error("error creating _site/ for HTML report")
panic(err)
}
if err := reports.WriteHTML(allReports, "_site/index.html"); err != nil {
slog.Error("error rendering HTML template", "err", err)
os.Exit(1)
}
Expand Down

0 comments on commit e9dac1f

Please sign in to comment.