diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml index 3a93e47..dba9ec7 100644 --- a/.github/workflows/e2e.yml +++ b/.github/workflows/e2e.yml @@ -75,6 +75,7 @@ jobs: printf 'user e2e\n' > cmd/dashboard/user-dist/index.html go install github.com/swaggo/swag/cmd/swag@latest "$(go env GOPATH)/bin/swag" init --pd -d cmd/dashboard -g main.go -o cmd/dashboard/docs + go build -o /tmp/nezha-dashboard ./cmd/dashboard - name: Start backend working-directory: nezha @@ -82,7 +83,7 @@ jobs: GIN_MODE: release run: | mkdir -p data - nohup go run ./cmd/dashboard -c data/config.yaml -db data/sqlite.db \ + nohup /tmp/nezha-dashboard -c data/config.yaml -db data/sqlite.db \ > /tmp/dashboard.log 2>&1 & echo $! > /tmp/dashboard.pid diff --git a/README.md b/README.md index eddfd3d..69c552a 100644 --- a/README.md +++ b/README.md @@ -30,12 +30,13 @@ printf 'admin e2e\n' > cmd/dashboard/admin-dist/in printf 'user e2e\n' > cmd/dashboard/user-dist/index.html go install github.com/swaggo/swag/cmd/swag@latest "$(go env GOPATH)/bin/swag" init --pd -d cmd/dashboard -g main.go -o cmd/dashboard/docs +go build -o /tmp/nezha-dashboard ./cmd/dashboard NZ_LISTENHOST=127.0.0.1 NZ_LISTENPORT=8008 \ NZ_JWTSECRETKEY=e2e-jwt-secret-key-min-32-chars-long-ok \ NZ_AGENTSECRETKEY=e2e-agent-secret-32-bytes-long-ok \ NZ_SITENAME=nezha-e2e GIN_MODE=release \ - go run ./cmd/dashboard -c data/config.yaml -db data/sqlite.db + /tmp/nezha-dashboard -c data/config.yaml -db data/sqlite.db ``` Then back in this repo: