diff --git a/gitea-ci/main.go b/gitea-ci/main.go index 7868ddf..f6fb90f 100644 --- a/gitea-ci/main.go +++ b/gitea-ci/main.go @@ -7,8 +7,13 @@ import ( "strings" "gitea.nulo.in/Nulo/repro-run/gitea-ci/gitea" + + _ "embed" ) +//go:embed index.html +var index []byte + func main() { config := parseConfig() @@ -31,7 +36,7 @@ func main() { http.Handle("/webhook", webhook{config: config, gitea: g}) http.Handle("/logs/socket/", logWebsocket{}) - http.Handle("/", http.FileServer(http.Dir("."))) + http.Handle("/", staticRoute{file: index, mime: "text/html; charset=utf-8"}) log.Fatal(http.ListenAndServe(port, nil)) }