TheHideout-UI/Jenkinsfile
Tom Butcher 4028675dd0
All checks were successful
thehideout/TheHideout-UI/pipeline/head This commit looks good
Use NPX for running wrangler.
2026-01-02 23:01:05 +00:00

30 lines
776 B
Groovy

def deploy() {
node('ubuntu') {
try {
checkout scm
nodejs(nodeJSInstallationName: 'Node23') {
stage('Install') {
sh 'yarn install --frozen-lockfile --production=false'
}
stage('Build') {
sh 'NODE_ENV=production yarn build'
}
stage('Deploy') {
// Deploy to Cloudflare Pages using wrangler
withCredentials([string(credentialsId: 'th-cloudflare-api-token', variable: 'CLOUDFLARE_API_TOKEN')]) {
sh 'npx wrangler pages deploy dist'
}
}
}
} finally {
cleanWs()
}
}
}
deploy()