From d076c2ec1da079777651dfeca1f6e917ebac0791 Mon Sep 17 00:00:00 2001 From: lpgeiger <1364012+lpgeiger@users.noreply.github.com> Date: Wed, 5 May 2021 19:05:22 +0000 Subject: [PATCH] release to create public web files --- .github/workflows/release.yaml | 12 ++++++++++++ ol/cli/src/server.rs | 6 +++--- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 9539c87bef..4e20ae3faa 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -31,3 +31,15 @@ jobs: file_glob: true tag: ${{ github.ref }} overwrite: true + - name: Web + run: zip -r public.zip ol/cli/web-monitor + - name: Upload Web Files + uses: svenstaro/upload-release-action@v2 + with: + repo_token: ${{ secrets.GITHUB_TOKEN }} + file: public.zip + file_glob: true + tag: ${{ github.ref }} + overwrite: true + + \ No newline at end of file diff --git a/ol/cli/src/server.rs b/ol/cli/src/server.rs index 0c76c72a8b..0e6fb041a4 100644 --- a/ol/cli/src/server.rs +++ b/ol/cli/src/server.rs @@ -49,11 +49,11 @@ pub async fn start_server(node: Node) { let node_home = cfg.clone().workspace.node_home.clone(); - let web_files = if !*IS_PROD { + let web_files = if *IS_PROD { + node_home.join("web-monitor/public/") // for using `npm run dev` - PathBuf::from("/root/libra/ol/cli/web-monitor/public/") } else { - node_home.join("web-monitor/public/") + PathBuf::from("/root/libra/ol/cli/web-monitor/public/") }; //GET /