Fix build commands

This commit is contained in:
Hamcha 2022-05-10 16:36:08 +02:00
parent 5558ca679c
commit 1e8b3d6bf7
Signed by untrusted user: hamcha
GPG key ID: 1669C533B8CF6D89
2 changed files with 8 additions and 8 deletions

View file

@ -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:

View file

@ -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",