> ## Documentation Index
> Fetch the complete documentation index at: https://docs.porter.run/llms.txt
> Use this file to discover all available pages before exploring further.

# Predeploy in porter.yaml

> Configure predeploy jobs in porter.yaml to run database migrations or setup tasks after each build completes but before deployment begins

Predeploy is run following a new build, but before the build is deployed to the cluster. This is a good place to run migrations, or to generate any files that are needed for the deploy.
For more information on pre-deploy jobs in Porter, see [Pre-deploy Jobs](/applications/deploy/pre-deploy-jobs).

```yaml theme={null}
predeploy:
  run: 'npm run migrate'
```
