diff --git a/Jenkinsfile b/Jenkinsfile index 3cc2a18..1258b14 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -1,7 +1,7 @@ pipeline { agent any stages { - stage('Install') { + stage('Build go binary') { agent { docker { image 'golang:1.23-alpine' @@ -13,6 +13,19 @@ pipeline { sh 'go build main.go' } } + stage('Build static assets') { + agent { + docker { + image 'node:22' + reuseNode true + } + } + steps { + sh 'npm i -g pnpm' + sh 'pnpm i' + sh 'pnpm build' + } + } stage('Populate env') { steps { sh 'rm .env || true' diff --git a/package.json b/package.json index 1b68bdd..245bd95 100644 --- a/package.json +++ b/package.json @@ -4,8 +4,9 @@ "description": "", "main": "main.go", "scripts": { - "dev": "concurrently 'air' 'tailwindcss -i ./public/css/input.css -o ./public/css/output.css --watch' 'templ generate --watch'", "air": "air", + "build": "tailwindcss -i ./public/css/input.css -o ./public/css/output.css --minify", + "dev": "concurrently 'air' 'tailwindcss -i ./public/css/input.css -o ./public/css/output.css --watch' 'templ generate --watch'", "tailwind:watch": "tailwindcss -i ./public/css/input.css -o ./public/css/output.css --watch", "tailwind:build": "tailwindcss -i ./public/css/input.css -o ./public/css/output.css --minify", "temple:watch": "templ generate --watch"