Auto deploy to vercel when published from plasmic not working

Hello Team,
I have trouble in auto deployment to vercel when I publish changes from plasmic. Here’s the case scenario:

Scenario 1

  1. I create code project from npx create-plasmic-app@latest and put project url and push to gitlab .
  2. I import gitlab project into vercel and create deploy hook from git section and put that deploy hook code in plasmic studio in call webkhook section while publishing.
  3. when I publish the changes. it triggers webhook and auto deployed in vercel and everything works as expected.

Scenario 2

  1. I create project just like first senario. and then I do plasmic sync --projects [my projectid], it will pull all pages, css , components to my code. If my developer wants to do any manual code written, he will work on it and push to gitlab
  2. I import as first senario and create deploy hook and apply in plasmic studio as above.

Now when I have any changes from plasmic, it does trigger webhook and build deployment successfull too in vercel. but in the live site, nothing gets updated. I’m scratching my head why’s so that. is there any solution that on both scenario ( first one is working, so second senario ) needs to have auto deployment works when publish from plasmic. . Actually deployment is successful but problem is the changes done in plasmic do not reflect in live site.

Can you guys please help me on this what I’m missing ?

Thanks,
Shrawan

Scenario 1 is loader, and scenario 2 is codegen, correct?

For codegen, your webhook would need to trigger a plasmic sync to get the latest published version of your Plasmic project. This must happen before next build.

and how can I do that ? if we put plasmic sync --projects [project_ID] && next buiild to package.json in build properties. will that work ?

That would probably work, but it’s not recommended, since plasmic sync will update files. In your use case, you might want to switch to loader instead.