ci: fix deploy-obs-tiny-engine to build and deploy#35
Conversation
WalkthroughThis PR modifies the build and deployment pipeline by switching the Git submodule URL from SSH to HTTPS, adding a pre-build documentation timing step, updating artifact paths to the lowcode-portal package structure, introducing Git submodule synchronization in CI, and making the static path configuration environment-driven. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Poem
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
📜 Review details
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (4)
.github/workflows/deploy-obs-tiny-engine.yml.gitmodulespackages/lowcode-portal/package.jsonpackages/lowcode-portal/vite.config.js
🔇 Additional comments (6)
.gitmodules (1)
3-3: LGTM! HTTPS submodule URL is appropriate for CI/CD.Switching from SSH to HTTPS is the correct approach for GitHub Actions workflows, as it avoids SSH key configuration requirements and works seamlessly with public repositories.
packages/lowcode-portal/package.json (1)
10-10: LGTM! Consistent pre-build documentation timing.Adding
obtainDocTimebefore the build is consistent with thedevscript pattern and ensures documentation timestamps are generated before the build process, which is particularly important now that the workflow includes submodule synchronization..github/workflows/deploy-obs-tiny-engine.yml (4)
43-43: LGTM! Using --ignore-scripts improves CI security.The
--ignore-scriptsflag is a security best practice for CI environments, preventing potentially malicious or unintended lifecycle scripts from executing during dependency installation.
44-53: Verify submodule update strategy with --remote flag.The
git submodule update --remote --merge --recursivecommand updates submodules to their remote branch's latest commit, rather than the commit pinned in this repository. This means builds could break unexpectedly if thetiny-enginesubmodule introduces breaking changes.Consider whether you want to:
- Option 1 (current): Always use the latest submodule commit for builds (more dynamic, higher risk)
- Option 2 (pinned): Remove the
--remoteflag to use the pinned commit in this repo (more stable, requires manual submodule updates)If Option 1 is intentional for always deploying the latest documentation/features, ensure the
tiny-enginesubmodule has stable release practices.
74-74: LGTM! Artifact paths consistently updated.The artifact paths have been correctly updated throughout the workflow:
- Upload (line 74):
packages/lowcode-portal/dist/- Download (line 84):
packages/lowcode-portal/dist/- Deployment (line 106):
packages/lowcode-portal/distThis properly reflects the monorepo structure and ensures artifacts are uploaded and downloaded from the correct location.
Also applies to: 84-84, 106-106
1-107: Verify that 404.html handling is no longer needed.The workflow previously included a step to copy
index.htmlto404.html. This step has been removed. Please confirm that:
- 404 error handling is configured at the OBS bucket level, or
- The deployment model no longer requires a client-side 404 fallback, or
- The application handles 404s through a different mechanism
If this was removed unintentionally, you may need to add it back after the artifact download step.
Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.