Should a webhook to deploy strapi run strapi build?

I am about to deploy my first strapi project to AWS. Following the docs (AWS Deployment | Strapi Documentation) I will create a webhook to trigger a deployment. In the docs there is this command to pull and restart:

const PM2_CMD = 'cd ~ && pm2 startOrRestart ecosystem.config.js';
`cd ${repo} && git pull && ${PM2_CMD}`

I don’t see any npm run build or strapi build. Isn’t the build step necessary after pulling from git and before restarting the application? Am I missing something here?

npm run build / strapi build are both to create/update the strapi admin piece you so if you want to use the admin then you you need to do it every time.

Exactly, this is what I thought… So I think the deployment hook should rather run this every time.