fix(deploy): reclaim www-data ownership before git reset
Local Build and Deploy / deploy (push) Failing after 1m16s
Local Build and Deploy / deploy (push) Failing after 1m16s
Stale host sources survived reset when files were owned by www-data, leaving an old nitro editor with a removed Json type that failed typecheck. Co-authored-by: Cursor <[email protected]>
This commit is contained in:
1 parent
1f552c2822
commit
c053b8de87
3 files changed
+27
No files matched your search
@@ -39,6 +39,7 @@ interface NitroEditorDialogProps {
|
||||
onOpenChange: (open: boolean) => void;
|
||||
}
|
||||
|
||||
/** Nested metadata patch helpers (no ambient Json type — keep this file typecheck-clean). */
|
||||
function updateNested(
|
||||
obj: Record<string, unknown>,
|
||||
path: string,
|
||||
|
||||
@@ -15,6 +15,16 @@ describe("production deploy workflow", () => {
|
||||
expect(workflow).toContain("SKIP_ENV_VALIDATION=1");
|
||||
});
|
||||
|
||||
it("reclaims ownership before git reset so www-data files can be overwritten", () => {
|
||||
expect(workflow).toContain('sudo chown -R "${DEPLOY_USER}:${DEPLOY_GROUP}"');
|
||||
const reclaimAt = workflow.indexOf(
|
||||
'sudo chown -R "${DEPLOY_USER}:${DEPLOY_GROUP}"',
|
||||
);
|
||||
const resetAt = workflow.indexOf("git reset --hard origin/main");
|
||||
expect(reclaimAt).toBeGreaterThan(-1);
|
||||
expect(resetAt).toBeGreaterThan(reclaimAt);
|
||||
});
|
||||
|
||||
it("does not override onlyBuiltDependencies (uses pnpm-workspace.yaml)", () => {
|
||||
expect(workflow).not.toContain("PNPM_CONFIG_ONLY_BUILT_DEPENDENCIES");
|
||||
});
|
||||
|
||||
Reference in new issue
Block a user