Seperate out stages
This commit is contained in:
parent
5a951d8c90
commit
5003743720
6
Jenkinsfile
vendored
6
Jenkinsfile
vendored
@ -1,14 +1,18 @@
|
|||||||
def deploy() {
|
def deploy() {
|
||||||
node('ubuntu') {
|
node('ubuntu') {
|
||||||
try {
|
try {
|
||||||
stage('Deploy (Ubuntu)') {
|
|
||||||
checkout scm
|
checkout scm
|
||||||
|
|
||||||
nodejs(nodeJSInstallationName: 'Node23') {
|
nodejs(nodeJSInstallationName: 'Node23') {
|
||||||
|
stage('Install') {
|
||||||
sh 'yarn install --frozen-lockfile --production=false'
|
sh 'yarn install --frozen-lockfile --production=false'
|
||||||
|
}
|
||||||
|
|
||||||
|
stage('Build') {
|
||||||
sh 'NODE_ENV=production yarn build'
|
sh 'NODE_ENV=production yarn build'
|
||||||
|
}
|
||||||
|
|
||||||
|
stage('Deploy') {
|
||||||
// Deploy to Cloudflare Pages using wrangler
|
// Deploy to Cloudflare Pages using wrangler
|
||||||
withCredentials([string(credentialsId: 'th-cloudflare-api-token', variable: 'CLOUDFLARE_API_TOKEN')]) {
|
withCredentials([string(credentialsId: 'th-cloudflare-api-token', variable: 'CLOUDFLARE_API_TOKEN')]) {
|
||||||
sh 'yarn wrangler pages deploy dist'
|
sh 'yarn wrangler pages deploy dist'
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user