#Build
Your Addon cannot initiate a Build, Audit, or Deploy, but it can trigger the Staging Site's data to refresh. This can be used when your Addon's buildObjects
have been updated (See the buildStarted Event).
For example, a user may use one of your Addon's Screens to save some settings that update buildObjects
. The Staging Site will not know to refresh its data unless you tell it to rebuild by calling cms.build()
.
// use static-cms-addon
import cms from 'static-cms-addon'
await cms.build()
// use axios
await axios.post(`http://localhost:${cmsPort}/api/addon/${addonId}/build`)