Files
home/Jenkinsfile

32 lines
689 B
Groovy

pipeline {
agent any
environment {
CLOUDFLARE_API_TOKEN = credentials('CLOUDFLARE_API_TOKEN')
}
stages {
stage('Build') {
steps {
echo 'Building VitePress site...'
sh 'npm ci && npm run build'
}
}
stage('Deploy') {
steps {
echo 'Deploying to Cloudflare Pages...'
sh 'npx wrangler pages deploy docs/.vitepress/dist --project-name=web-home --branch main'
}
}
}
post {
success {
echo 'Deployment successful!'
}
failure {
echo 'Deployment failed!'
}
}
}