tombutcher-cdn/Jenkinsfile
Tom Butcher 8b86334af9
All checks were successful
tombutcher.work/tombutcher-cdn/pipeline/head This commit looks good
Deploy to production
2025-04-06 23:56:19 +01:00

38 lines
779 B
Groovy

pipeline {
agent any
environment {
NODE_ENV = 'production'
CLOUDFLARE_ACCOUNT_ID = credentials('cloudflare-account-id')
CLOUDFLARE_API_TOKEN = credentials('cloudflare-api-token')
PROJECT_NAME = 'tombutcher-cdn'
}
tools {
nodejs 'Node23' // This should match the name of your NodeJS installation in Jenkins tools
}
stages {
stage('Checkout') {
steps {
checkout scm // Checkout the repository
}
}
stage('Deploy to Cloudflare Pages') {
steps {
sh 'npx wrangler pages deploy . --project-name $PROJECT_NAME --branch production'
}
}
}
post {
failure {
echo 'Build or deployment failed.'
}
success {
echo 'Successfully deployed to Cloudflare Pages.'
}
}
}