Skip to content

recipes/git

View source on GitHub

typescript
import '@catapultjs/deploy/recipes/git'

branch is required on each host. The repository is auto-detected from git remote get-url origin if not set in defineConfig.

Tasks

TaskInsertedDescription
git:checkafter deploy:lockVerifies the configured branch exists on the remote repository
git:updatebefore deploy:update_codeClones a bare mirror into .catapult/repo, or fetches it if it already exists
deploy:update_codeOverrides the built-in task and clones or fetches the requested branch into releases/<release>

The local mirror at .catapult/repo avoids re-cloning from the remote on every deployment. Subsequent deploys fetch the mirror, then clone or reset the release from that local cache.