update
This commit is contained in:
@ -1,46 +1,36 @@
|
|||||||
steps:
|
steps:
|
||||||
- name: setup
|
- name: setup
|
||||||
image: node:22-alpine
|
image: node:22-alpine
|
||||||
commands:
|
commands:
|
||||||
- apk update && apk add git
|
- apk update && apk add git
|
||||||
- npm i typescript -g
|
- npm i typescript -g
|
||||||
- npm install
|
- npm install
|
||||||
- echo '✅ success setup project'
|
- echo '✅ success setup project'
|
||||||
when:
|
when:
|
||||||
branch:
|
branch:
|
||||||
- main
|
- master
|
||||||
|
|
||||||
- name: build-swagger
|
- name: build-src
|
||||||
image: node:22-alpine
|
image: node:22-alpine
|
||||||
environment:
|
environment:
|
||||||
NODE_ENV: prod
|
NODE_ENV: prod
|
||||||
commands:
|
commands:
|
||||||
- npm run swagger
|
- npm i typescript -g
|
||||||
when:
|
- npm run build:production
|
||||||
branch:
|
- echo '✅ success compile typescript and ready to deploy'
|
||||||
- main
|
when:
|
||||||
|
branch:
|
||||||
|
- master
|
||||||
|
|
||||||
- name: build-src
|
- name: deploy
|
||||||
image: node:22-alpine
|
image: docker
|
||||||
environment:
|
commands:
|
||||||
NODE_ENV: prod
|
- docker builder prune -f
|
||||||
commands:
|
- docker container prune -f
|
||||||
- npm i typescript -g
|
- docker-compose build
|
||||||
- npm run build:production
|
- docker-compose up -d --no-deps --build --remove-orphans
|
||||||
- echo '✅ success compile typescript and ready to deploy'
|
volumes:
|
||||||
when:
|
- /var/run/docker.sock:/var/run/docker.sock
|
||||||
branch:
|
when:
|
||||||
- main
|
branch:
|
||||||
|
- master
|
||||||
- name: deploy
|
|
||||||
image: docker
|
|
||||||
commands:
|
|
||||||
- docker builder prune -f
|
|
||||||
- docker container prune -f
|
|
||||||
- docker-compose build
|
|
||||||
- docker-compose up -d --no-deps --build --remove-orphans
|
|
||||||
volumes:
|
|
||||||
- /var/run/docker.sock:/var/run/docker.sock
|
|
||||||
when:
|
|
||||||
branch:
|
|
||||||
- main
|
|
||||||
|
|||||||
Reference in New Issue
Block a user