Conversation
There was a problem hiding this comment.
Pull request overview
This PR configures the repository as a pnpm workspace and updates the staging merge workflow to accommodate this change. The primary purpose is to establish a monorepo structure where the CMS is a workspace package, enabling better dependency management and coordinated builds.
Changes:
- Adds pnpm workspace configuration defining 'cms' as a workspace package
- Updates the sync-mdx-to-strapi job to depend on rebuild-strapi completion
- Changes dependency installation from CMS-only to workspace-wide installation
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| pnpm-workspace.yaml | Adds workspace configuration with 'cms' package, defining the monorepo structure |
| .github/workflows/staging-merge.yml | Updates sync job dependencies, adds always() condition, and changes to workspace-level dependency installation |
| if: | | ||
| (needs.check-pr-merge.outputs.is_merged_pr == 'true' && needs.check-pr-merge.outputs.content_changed == 'true') || | ||
| needs.check-pr-merge.outputs.is_merged_pr == 'manual' | ||
| always() && |
There was a problem hiding this comment.
The always() condition combined with the rebuild-strapi dependency could cause the sync job to run even when rebuild-strapi fails. This means MDX content could be synced to a broken Strapi instance.
Consider using a more specific condition that checks if rebuild-strapi either succeeded or was skipped (not failed):
needs.rebuild-strapi.result == 'success' || needs.rebuild-strapi.result == 'skipped'This would ensure the sync job only runs when Strapi is in a good state, while still allowing it to run when the rebuild was skipped (because no CMS changes were detected).
| always() && | |
| (needs.rebuild-strapi.result == 'success' || needs.rebuild-strapi.result == 'skipped') && |
|
|
||
| - name: Install CMS dependencies | ||
| working-directory: cms | ||
| - name: Install dependencies |
There was a problem hiding this comment.
Moving pnpm install from cms/ directory to root directory changes where dependencies are installed. With the new pnpm workspace configuration, running pnpm install in the root will install dependencies for both the root package and the cms workspace package. However, the subsequent step still runs pnpm run sync:mdx in the cms working directory, which expects cms dependencies to be available.
This should work correctly with the workspace setup, but it's worth noting that this is a behavioral change: previously only CMS dependencies were installed, now all workspace dependencies are installed. This could increase build time and may not be necessary if the sync script only needs cms dependencies.
| - name: Install dependencies | |
| - name: Install CMS dependencies | |
| working-directory: cms |
No description provided.