Rob N
04/13/2022, 1:30 PMafter_deploy
and its coming back with command not found. We install PNPM in the compile
section of the seed.yaml
. Is there a way to use PNPM without having to reinstall it all over again just for the after_deploy
section? I need to run some commands specifically on the graphql services that have changed in that deploy.Frank
after_deploy
? Is that something you can run using the Script
construct?https://docs.serverless-stack.com/constructs/Script#running-after-deployFrank
after_deploy
step is run in a new build environment.Frank
Rob N
04/13/2022, 9:36 PMFrank
Script
construct should work. You can hook into both onCreate
and `onUpdate`:
import { Stack, Script } from "@serverless-stack/resources";
export class AfterDeployStack extends Stack {
constructor(scope, id) {
super(scope, id);
new Script(this, "RegisterSchema", {
onCreate: "src/registerSchema.main",
onUpdate: "src/registerSchema.main",
});
}
}
Rob N
04/14/2022, 12:11 AM