1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

テンセントクラウドのバケット(COS)に静的サイトをServerless Framework経由でデプロイする

Posted at

まえがき

こちらのほぼ続きです。

テンセントクラウドのバケット(COS)をServerless Framework経由で作成する
https://qiita.com/antk/items/4f1787304101f2e667a6

上記で作成したバケットに静的サイトをデプロイします。

ディレクトリ構成

必要最低限の構成としてはこんな感じ。

my-homepage
├── src
│   └── index.html
├── .env
└── serverless.yml

デプロイ

.env の中身は↑の記事と同じでOK。
serverless.yml はこんな感じ。

serverless.yml
app: tencent-website
name: my-homepage
component: website

inputs:
  src:
    root: ./
    src: ./src
    index: index.html
    websitePath: ./
  region: ap-tokyo
  bucketName: 上記の記事で作ったバケット名
  protocol: http

htmlしかないような構成ならこれでいけるはず。

serverless ⚡framework
Action: "deploy" - Stage: "dev" - App: "tencent-website" - Instance: "my-homepage"

region:  ap-tokyo
website: http://デプロイできたリンク

前往控制台查看应用详细信息: https://serverless.cloud.tencent.com/xxxxxxxxxx

177s › my-homepage › Success

できました。
至らない部分もかなりありそうですがドキュメントを読んで補完していただけると嬉しいです(ご指摘のコメントいただけるともっと嬉しいです)。

1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?