@urcloud/oss-deploy
v1.9.2
Published
Deploy static assests to tencent cos.
Downloads
29
Readme
oss-deploy
Cli tool for deploy assets to tencent cos.
How it works
- Read config from
oss-deploy.yaml
.(use--config
to custom config) - Upload local assets from
dist
.
Install
npm i @urcloud/oss-deploy -D
Usage
- create
oss-deploy.yaml
local:
dist: ./dist
# filter:
# directoryFilter:
# - '!.git'
# - '!*modules'
target:
prefix: oss-deploy/
#cacheControl: 'max-age=31536000'
oss:
region: ${env.COS_REGION}
bucket: ${env.COS_BUCKET}
secretId: ${env.COS_SECRET_ID}
secretKey: ${env.COS_SECRET_KEY}
- add
scripts
in package.json
{
"scripts": {
"deploy-oss": "cross-env COS_REGION=aa COS_BUCKET=bb COS_SECRET_ID=cc COS_SECRET_KEY=dd oss-deploy upload"
}
}