@phenomlab the postbuild script will only run when you execute ./nodebb build via npm run build as that has the logic to execute the postbuild step. The postbuild script should probably be modified to only sync the build/public folder after the initial sync. There should be no need to sync public with every build unless the version of nodebb changes. All new uploads would already be stored in the S3/R2 bucket by the s3 upload plugin.
So a npm run build init for the initial sync that includes all static assets, and then just npm run build that only syncs the rebuilt assets such as templates , plugins etc.