Update build to allow custom path (or use relative paths)
This commit is contained in:
parent
0872bb07f6
commit
a6ecace783
2 changed files with 38 additions and 4 deletions
39
.drone.yml
39
.drone.yml
|
@ -19,10 +19,41 @@ steps:
|
||||||
depends_on:
|
depends_on:
|
||||||
- restore-cache
|
- restore-cache
|
||||||
|
|
||||||
- name: build
|
- name: build_versioned
|
||||||
image: node
|
image: node
|
||||||
commands:
|
commands:
|
||||||
- yarn build
|
- yarn build
|
||||||
|
environment:
|
||||||
|
SUBPATH: /${DRONE_COMMIT_SHA:0:8}
|
||||||
|
when:
|
||||||
|
event:
|
||||||
|
- push
|
||||||
|
depends_on:
|
||||||
|
- dependencies
|
||||||
|
|
||||||
|
- name: build_pr
|
||||||
|
image: node
|
||||||
|
commands:
|
||||||
|
- yarn build
|
||||||
|
environment:
|
||||||
|
SUBPATH: /pr-${DRONE_PULL_REQUEST}
|
||||||
|
when:
|
||||||
|
event:
|
||||||
|
- pull_request
|
||||||
|
depends_on:
|
||||||
|
- dependencies
|
||||||
|
|
||||||
|
- name: build_master
|
||||||
|
image: node
|
||||||
|
commands:
|
||||||
|
- yarn build
|
||||||
|
environment:
|
||||||
|
SUBPATH: /latest
|
||||||
|
when:
|
||||||
|
event:
|
||||||
|
- push
|
||||||
|
branch:
|
||||||
|
- master
|
||||||
depends_on:
|
depends_on:
|
||||||
- dependencies
|
- dependencies
|
||||||
|
|
||||||
|
@ -42,7 +73,7 @@ steps:
|
||||||
event:
|
event:
|
||||||
- push
|
- push
|
||||||
depends_on:
|
depends_on:
|
||||||
- build
|
- build_versioned
|
||||||
|
|
||||||
- name: upload_build_pr
|
- name: upload_build_pr
|
||||||
image: plugins/s3
|
image: plugins/s3
|
||||||
|
@ -60,7 +91,7 @@ steps:
|
||||||
event:
|
event:
|
||||||
- pull_request
|
- pull_request
|
||||||
depends_on:
|
depends_on:
|
||||||
- build
|
- build_pr
|
||||||
|
|
||||||
- name: upload_build_master
|
- name: upload_build_master
|
||||||
image: plugins/s3
|
image: plugins/s3
|
||||||
|
@ -80,7 +111,7 @@ steps:
|
||||||
branch:
|
branch:
|
||||||
- master
|
- master
|
||||||
depends_on:
|
depends_on:
|
||||||
- build
|
- build_master
|
||||||
|
|
||||||
- name: test
|
- name: test
|
||||||
image: node
|
image: node
|
||||||
|
|
3
vue.config.js
Normal file
3
vue.config.js
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
module.exports = {
|
||||||
|
publicPath: process.env.SUBPATH ? process.env.SUBPATH : ""
|
||||||
|
};
|
Loading…
Reference in a new issue