diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index a0a01c2..2a2622d 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -7,7 +7,7 @@ on: workflow_dispatch: jobs: - on-success: + release: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 79a5495..dbf9aff 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -9,6 +9,7 @@ on: - ".github/workflows/test-on-pr.yml" - ".github/workflows/contributors.yml" - ".github/workflows/sync.yml" + - ".github/workflows/release.yml" - "README.md" - ".goreleaser.yml" diff --git a/README.md b/README.md index d6a1f14..b61f072 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@
LOGO designed by 熊大 .

-GitHub release (with filter)    +GitHub release (with filter)   

:trollface: Nezha Monitoring: Self-hostable, lightweight, servers and websites monitoring and O&M tool.

diff --git a/cmd/dashboard/controller/controller.go b/cmd/dashboard/controller/controller.go index dfe8c92..7edc12a 100644 --- a/cmd/dashboard/controller/controller.go +++ b/cmd/dashboard/controller/controller.go @@ -16,6 +16,7 @@ import ( "github.com/nicksnyder/go-i18n/v2/i18n" "github.com/naiba/nezha/pkg/mygin" + "github.com/naiba/nezha/pkg/utils" "github.com/naiba/nezha/resource" "github.com/naiba/nezha/service/singleton" ) @@ -29,9 +30,11 @@ func ServeWeb(port uint) *http.Server { if err != nil { panic(err) } - tmpl, err = tmpl.ParseGlob("resource/template/**/*.html") - if err != nil { - panic(err) + if utils.IsFileExists("resource/template") { + tmpl, err = tmpl.ParseGlob("resource/template/**/*.html") + if err != nil { + panic(err) + } } r.SetHTMLTemplate(tmpl) if singleton.Conf.Debug {