From 119f8d64559a14c0fa012997fbeb4036217f10dc Mon Sep 17 00:00:00 2001 From: Jeroen Date: Sat, 14 Oct 2023 10:12:29 +0200 Subject: [PATCH] Fixed GH Pages builds --- .github/workflows/gh-pages.yml | 2 +- Earthfile | 2 ++ src/index.tsx | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/gh-pages.yml b/.github/workflows/gh-pages.yml index 004e3339..ce38f57f 100644 --- a/.github/workflows/gh-pages.yml +++ b/.github/workflows/gh-pages.yml @@ -21,7 +21,7 @@ jobs: version: v0.7.8 - name: Build release - run: earthly +release + run: earthly +release --build_type=standalone - name: Unpack release run: unzip release.zip -d build diff --git a/Earthfile b/Earthfile index ab91318f..d6470cee 100644 --- a/Earthfile +++ b/Earthfile @@ -32,7 +32,9 @@ build-py: release: BUILD +build-py ARG release_tag=release + ARG build_type=release FROM +setup-base + ENV REACT_APP_BUILD=$build_type RUN apt-get update && apt install -y zip COPY +build-py/dist/* public/ RUN npm run build:css diff --git a/src/index.tsx b/src/index.tsx index cf97c1b6..acf5e1b9 100644 --- a/src/index.tsx +++ b/src/index.tsx @@ -19,7 +19,7 @@ const run = (system: Storage): void => { assembly.processingEngine.start() } -if (process.env.NODE_ENV === 'production') { +if (process.env.REACT_APP_BUILD!=='standalone' && process.env.NODE_ENV === 'production') { // Setup embedded mode (requires to be embedded in iFrame) console.log('Initializing storage system') LiveStorage.create(window, run)