Skip to content

recipes/vitepress

View source on GitHub

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

See the example VitePress project for a complete setup, or go directly to deploy.ts.

Tasks

TaskInsertedDescription
deploy:buildbefore deploy:lockRuns vitepress build <vitepress_path> on the local machine
deploy:update_codeOverrides the built-in task and uploads <vitepress_path>.vitepress/dist to releases/<release> via SCP

Configuration

KeyTypeDefaultDescription
vitepress_pathstring''Path passed to vitepress build. The uploaded output is read from <vitepress_path>.vitepress/dist
source_pathstring''Used as the default value for vitepress_path
typescript
import { defineConfig, set } from '@catapultjs/deploy'
import '@catapultjs/deploy/recipes/vitepress'

set('vitepress_path', 'docs/')

export default defineConfig({
  hosts: [
    {
      name: 'production',
      ssh: 'deploy@example.com',
      deployPath: '/home/deploy/docs',
    },
  ],
})