diff --git a/Jenkinsfile b/Jenkinsfile index 1505701..9de208d 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -1,14 +1,18 @@ def deploy() { node('ubuntu') { try { - stage('Deploy (Ubuntu)') { - checkout scm + checkout scm - nodejs(nodeJSInstallationName: 'Node23') { + 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 'yarn wrangler pages deploy dist'