0.1.5 • Published 5 months ago

@icebreakers/deploy v0.1.5

Weekly downloads
-
License
MIT
Repository
github
Last release
5 months ago

@icebreakers/deploy

deploy website to cdn

Install

yarn add -D @icebreakers/deploy

Usages

Cli

# .env
TENCENT_SECRET_ID=
TENCENT_SECRET_KEY=
TENCENT_COS_REGION=
TENCENT_COS_BUCKET=
# default deploy
ice-deploy
# deploy before clean bucket
ice-deploy -c
# deploy dir
ice-deploy --dir build

script

require('dotenv').config()
const { TencentCOSWebsiteDeployer } = require('@icebreakers/deploy')

async function main() {
  const { TENCENT_SECRET_ID, TENCENT_SECRET_KEY, TENCENT_COS_REGION, TENCENT_COS_BUCKET } = process.env
  const deployer = new TencentCOSWebsiteDeployer({
    SecretKey: TENCENT_SECRET_KEY,
    SecretId: TENCENT_SECRET_ID
  })

  await deployer.uploadDir({
    Bucket: TENCENT_COS_BUCKET,
    Region: TENCENT_COS_REGION,
    clean: true,
    targetDir: 'build'
  })
}

main()
0.1.5

5 months ago

0.1.4

1 year ago

0.1.3

1 year ago

0.1.1

2 years ago

0.1.0

2 years ago

0.0.9

2 years ago

0.0.8

2 years ago

0.0.7

2 years ago

0.0.6

2 years ago

0.0.5

2 years ago

0.0.4

2 years ago

0.0.3

2 years ago

0.0.2

2 years ago

0.0.1

2 years ago