Compare commits
3 Commits
9561887e4b
...
5a951d8c90
| Author | SHA1 | Date | |
|---|---|---|---|
| 5a951d8c90 | |||
| 3dfaa50415 | |||
| 9fea5eda26 |
3
.gitignore
vendored
3
.gitignore
vendored
@ -2,4 +2,5 @@ node_modules
|
|||||||
dist
|
dist
|
||||||
.wrangler
|
.wrangler
|
||||||
**/DS_Store
|
**/DS_Store
|
||||||
DS_Store
|
DS_Store
|
||||||
|
.DS_Store
|
||||||
25
Jenkinsfile
vendored
Normal file
25
Jenkinsfile
vendored
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
def deploy() {
|
||||||
|
node('ubuntu') {
|
||||||
|
try {
|
||||||
|
stage('Deploy (Ubuntu)') {
|
||||||
|
checkout scm
|
||||||
|
|
||||||
|
nodejs(nodeJSInstallationName: 'Node23') {
|
||||||
|
sh 'yarn install --frozen-lockfile --production=false'
|
||||||
|
|
||||||
|
sh 'NODE_ENV=production yarn build'
|
||||||
|
|
||||||
|
// Deploy to Cloudflare Pages using wrangler
|
||||||
|
withCredentials([string(credentialsId: 'th-cloudflare-api-token', variable: 'CLOUDFLARE_API_TOKEN')]) {
|
||||||
|
sh 'yarn wrangler pages deploy dist'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} finally {
|
||||||
|
cleanWs()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
deploy()
|
||||||
|
|
||||||
@ -40,7 +40,7 @@
|
|||||||
"build": "vite build",
|
"build": "vite build",
|
||||||
"lint": "eslint .",
|
"lint": "eslint .",
|
||||||
"preview": "npm run build && vite preview",
|
"preview": "npm run build && vite preview",
|
||||||
"deploy": "npm run build && wrangler pages deploy ./dist --skip-caching"
|
"deploy": "npm run build && wrangler pages deploy ./dist --skip-caching --branch production"
|
||||||
},
|
},
|
||||||
"eslintConfig": {
|
"eslintConfig": {
|
||||||
"extends": [
|
"extends": [
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user