This commit is contained in:
parent
fe9375109f
commit
4e0d101239
2 changed files with 6 additions and 7 deletions
11
.drone.yml
11
.drone.yml
|
@ -37,9 +37,6 @@ steps:
|
||||||
when:
|
when:
|
||||||
event:
|
event:
|
||||||
- push
|
- push
|
||||||
branch:
|
|
||||||
exclude:
|
|
||||||
- master
|
|
||||||
depends_on:
|
depends_on:
|
||||||
- dependencies
|
- dependencies
|
||||||
|
|
||||||
|
@ -49,6 +46,7 @@ steps:
|
||||||
- yarn build
|
- yarn build
|
||||||
environment:
|
environment:
|
||||||
SUBPATH: /tghandbook/pr-${DRONE_PULL_REQUEST}/dist
|
SUBPATH: /tghandbook/pr-${DRONE_PULL_REQUEST}/dist
|
||||||
|
OUTDIR: ./dist-pr
|
||||||
when:
|
when:
|
||||||
event:
|
event:
|
||||||
- pull_request
|
- pull_request
|
||||||
|
@ -61,6 +59,7 @@ steps:
|
||||||
- yarn build
|
- yarn build
|
||||||
environment:
|
environment:
|
||||||
SUBPATH: /tghandbook/latest/dist
|
SUBPATH: /tghandbook/latest/dist
|
||||||
|
OUTDIR: ./dist-master
|
||||||
when:
|
when:
|
||||||
event:
|
event:
|
||||||
- push
|
- push
|
||||||
|
@ -95,7 +94,7 @@ steps:
|
||||||
from_secret: minio_access
|
from_secret: minio_access
|
||||||
secret_key:
|
secret_key:
|
||||||
from_secret: minio_secret
|
from_secret: minio_secret
|
||||||
source: dist/**/*
|
source: dist-pr/**/*
|
||||||
target: /pr-${DRONE_PULL_REQUEST}/
|
target: /pr-${DRONE_PULL_REQUEST}/
|
||||||
path_style: true
|
path_style: true
|
||||||
endpoint: https://artifacts.fromouter.space
|
endpoint: https://artifacts.fromouter.space
|
||||||
|
@ -113,7 +112,7 @@ steps:
|
||||||
from_secret: minio_access
|
from_secret: minio_access
|
||||||
secret_key:
|
secret_key:
|
||||||
from_secret: minio_secret
|
from_secret: minio_secret
|
||||||
source: dist/**/*
|
source: dist-master/**/*
|
||||||
target: /latest/
|
target: /latest/
|
||||||
path_style: true
|
path_style: true
|
||||||
endpoint: https://artifacts.fromouter.space
|
endpoint: https://artifacts.fromouter.space
|
||||||
|
@ -145,4 +144,4 @@ volumes:
|
||||||
|
|
||||||
---
|
---
|
||||||
kind: signature
|
kind: signature
|
||||||
hmac: 1ec6e3a1d04e21c2492a33d789d04b8ea4cab5128ae91b1749d4aba74cd05e62
|
hmac: 8673ede880d77df3453f6785035712d4fca3ee77525b107de154c891558f10f1
|
||||||
|
|
2
build.js
2
build.js
|
@ -6,7 +6,7 @@ const entryFiles = Path.join(__dirname, "./index.html");
|
||||||
|
|
||||||
// Bundler options
|
// Bundler options
|
||||||
const options = {
|
const options = {
|
||||||
outDir: "./dist",
|
outDir: process.env.OUTDIR || "./dist",
|
||||||
outFile: "index.html",
|
outFile: "index.html",
|
||||||
publicUrl: process.env.SUBPATH || "/",
|
publicUrl: process.env.SUBPATH || "/",
|
||||||
watch: false,
|
watch: false,
|
||||||
|
|
Reference in a new issue