[feature] apify push with hooks
It's mostly an interop feature request, to be able to execute compilation/transpilation (babel/typescript), execute tests if any, then push to the platform. this ensures that you never push a broken / stale build. my use-case is compile to typescript, lint, run jest, then push
inspiration: https://www.npmjs.com/package/husky (for git) or "prepublish[Only]"
check package.json for a key that the apify cli could look for settings, like (there are a couple of packages that use this way, like parcel, browserslist, babel itself)
{
"apify": {
"prePush": "npm commands..."
}
}
or maybe even reuse npm's prepublish as a quick way to get this done, and be this behavior by default, and using --no-hooks (or something that ignores the settings, like --force) to apify push
If you are looking for a workaround, you can use any CI tool like GH actions. I wrote https://help.apify.com/en/articles/1861038-setting-up-continuous-integration-for-apify-actors-on-bitbucket some time ago how to do it on Bitbucket pipelines. I think it is a more common way, rather than using hooks.
that's definitely the way to go