Same code, two different outcomes when deployed

Hello everyone,
I’m experiencing a weird issue. I have a repo and two branches - main and staging. These two branches are identical. I deploy them as different Netlify projects to test new features and content on staging before I deploy to main and production. However, even though there are no errors in deployment, no warnings, and everything builds nicely, the actual page is slightly different.

Specifically, the CSS for one section is different. It looks right locally and on the staging server, but it is broken on main. The difference is in the HTML markup that is slightly different on main vs staging, but both versions are being deployed from the identical code. I run diff on the file between main and staging and the file in question is identical on both branches.

I use Statamic and I tried to clear all cache as a part of the build script so the script looks like this:
php please stache:clear && php please stache:warm && php please ssg:generate. I also cleared the cache on Netlify. I used “clear cache and hard refresh” on the browser and I tested it on various browsers. But still, while the staging site looks correct, the production site has broken CSS.

Here are the details for each site:
Main: https://objective-davinci-e5b3e7.netlify.app/
Staging: https://naughty-northcutt-19120b.netlify.app/

You can see the CSS issue in the latest blog article - laravel-eloquent-vs-query-builder - the code blocks.

What am I missing here? I’ve been scratching my head for days.
Thank you!

Hi @Zuk :wave:t6:, Welcome back to the forums!

Can you please share your repository and your most recent deploy logs for the site.

Thanks!

I figured it out! Turns out one project had the Assets Optimization enabled and the other didn’t. The Bundle CSS bundler was the culprit. It’s all fixed now.

Hi @Zuk :wave:t6: , thanks for coming back to the forums and letting us know what helped you resolve your issue. :smiling_face_with_three_hearts: