This commit is contained in:
parent
5558ca679c
commit
1e8b3d6bf7
2 changed files with 8 additions and 8 deletions
12
.drone.yml
12
.drone.yml
|
@ -17,21 +17,21 @@ steps:
|
||||||
image: node
|
image: node
|
||||||
failure: ignore
|
failure: ignore
|
||||||
commands:
|
commands:
|
||||||
- yarn
|
- npm ci
|
||||||
depends_on:
|
depends_on:
|
||||||
- restore-cache
|
- restore-cache
|
||||||
|
|
||||||
- name: lint
|
- name: lint
|
||||||
image: node
|
image: node
|
||||||
commands:
|
commands:
|
||||||
- yarn lint
|
- npm run lint
|
||||||
depends_on:
|
depends_on:
|
||||||
- dependencies
|
- dependencies
|
||||||
|
|
||||||
- name: build_versioned
|
- name: build_versioned
|
||||||
image: node
|
image: node
|
||||||
commands:
|
commands:
|
||||||
- yarn build
|
- npm run build
|
||||||
environment:
|
environment:
|
||||||
VITE_SUBPATH: /tghandbook/${DRONE_COMMIT_BRANCH/\//_}-${DRONE_COMMIT_SHA:0:8}
|
VITE_SUBPATH: /tghandbook/${DRONE_COMMIT_BRANCH/\//_}-${DRONE_COMMIT_SHA:0:8}
|
||||||
VITE_APP_REVISION: ${DRONE_COMMIT_SHA}
|
VITE_APP_REVISION: ${DRONE_COMMIT_SHA}
|
||||||
|
@ -44,10 +44,9 @@ steps:
|
||||||
- name: build_pr
|
- name: build_pr
|
||||||
image: node
|
image: node
|
||||||
commands:
|
commands:
|
||||||
- yarn build
|
- npm run build-pr
|
||||||
environment:
|
environment:
|
||||||
VITE_SUBPATH: /tghandbook/pr-${DRONE_PULL_REQUEST}
|
VITE_SUBPATH: /tghandbook/pr-${DRONE_PULL_REQUEST}
|
||||||
OUTDIR: ./dist-pr
|
|
||||||
VITE_APP_REVISION: ${DRONE_COMMIT_SHA}
|
VITE_APP_REVISION: ${DRONE_COMMIT_SHA}
|
||||||
when:
|
when:
|
||||||
event:
|
event:
|
||||||
|
@ -58,10 +57,9 @@ steps:
|
||||||
- name: build_branch
|
- name: build_branch
|
||||||
image: node
|
image: node
|
||||||
commands:
|
commands:
|
||||||
- yarn build
|
- npm run build-branch
|
||||||
environment:
|
environment:
|
||||||
VITE_SUBPATH: /tghandbook/${DRONE_COMMIT_BRANCH/\//_}
|
VITE_SUBPATH: /tghandbook/${DRONE_COMMIT_BRANCH/\//_}
|
||||||
OUTDIR: ./dist-branch
|
|
||||||
VITE_APP_REVISION: ${DRONE_COMMIT_SHA}
|
VITE_APP_REVISION: ${DRONE_COMMIT_SHA}
|
||||||
when:
|
when:
|
||||||
event:
|
event:
|
||||||
|
|
|
@ -7,7 +7,9 @@
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"start": "vite",
|
"start": "vite",
|
||||||
"lint": "eslint src",
|
"lint": "eslint src",
|
||||||
"build": "vite build --base=./"
|
"build": "vite build --base=./",
|
||||||
|
"build-branch": "vite build --base=./ --outDir=dist-branch",
|
||||||
|
"build-pr": "vite build --base=./ --outDir=dist-pr"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@types/node": "^17.0.31",
|
"@types/node": "^17.0.31",
|
||||||
|
|
Reference in a new issue