diff --git a/.github/workflows/deploy-gh-pages.yml b/.github/workflows/deploy-gh-pages.yml index 6b565cb21..340c6fdbb 100644 --- a/.github/workflows/deploy-gh-pages.yml +++ b/.github/workflows/deploy-gh-pages.yml @@ -35,9 +35,15 @@ jobs: // ---- appended by CI (gh-pages) ---- VITE_ORIGIN=https://agent.opentiny.design/ EOF - + - name: change material url + run: | + sed -i "s#material: \['/mock/bundle.json'\]#material: \['https://opentiny.github.io/tiny-engine/mock/bundle.json'\]#g" designer-demo/engine.config.js + echo "Updated material url in designer-demo/engine.config.js" - name: Run Build - run: pnpm run build:plugin && pnpm run build:alpha > /tmp/build-alpha.log 2>&1 + run: | + set -eo pipefail + pnpm run build:plugin 2>&1 | tee /tmp/build-plugin.log + pnpm run build:alpha 2>&1 | tee /tmp/build-alpha.log - name: Deploy uses: peaceiris/actions-gh-pages@v4 diff --git a/designer-demo/registry.js b/designer-demo/registry.js index c9101279d..e7af36d95 100644 --- a/designer-demo/registry.js +++ b/designer-demo/registry.js @@ -48,7 +48,7 @@ export default { options: { // 配置预览跳转的 url: // 文档:https://opentiny.design/tiny-engine#/help-center/course/dev/preview-api - previewUrl: ['prod', 'alpha'].includes(import.meta.env.MODE) ? './preview.html' : '' + previewUrl: ['prod', 'alpha'].includes(import.meta.env.MODE) ? `${import.meta.env.BASE_URL || '.'}/preview.html` : '' } } }