Giter VIP home page Giter VIP logo

frankswu / cloudbase-action Goto Github PK

View Code? Open in Web Editor NEW

This project forked from tencentcloudbase/cloudbase-action

0.0 1.0 0.0 9.97 MB

云开发 Tencent CloudBase Github Action 可以将 Github 项目自动部署到云开发环境(目前支持静态托管功能)

Home Page: https://cloudbase.net/

JavaScript 79.20% TypeScript 20.20% Shell 0.22% Makefile 0.13% Emacs Lisp 0.01% HTML 0.02% CoffeeScript 0.06% Roff 0.12% CSS 0.04% Python 0.01%

cloudbase-action's Introduction

Tecent CloudBase

Tencent CloudBase Github Action

.github/workflows/main.yml

云开发 Tencent CloudBase Github Action 可以将 Github 项目自动部署到云开发环境(目前支持静态托管功能,后续会支持其他资源)

🚀 在项目中使用此扩展

输入

提示: 标注 🔐 的参数属于敏感信息,需要放在项目的 secret 存储中,用法可以参考最后的实例

secretId 🔐

Required 云开发的访问密钥 secretId.

在腾讯云访问管理页面获取

secretKey 🔐

Required 云开发的访问密钥 secretKey.

在腾讯云访问管理页面获取

envId 🔐

Required 云开发的环境 id envId.

可以在云开发的控制台获取

staticSrcPath

Github 项目静态文件的路径。 默认值 build

如果需要上传项目根目录,可以填写 ./, 不过需要注意忽略不必要的文件,默认情况下会忽略 .git,.github,node_modules

staticDestPath

静态资源部署到云开发静态托管的路径,默认为根目录。

staitcIgnore

v.1.1.0 版本开始支持

静态资源部署时忽略的文件路径,支持通配符,例如node_modules/**, 多个路径可以用,隔开,默认值 .git,.github,node_modules

参考示例

例如项目中的静态资源存放在 build 目录,希望部署到云开发静态网站托管的根目录下

可以编写如下的 Github Action 文件 .github/workflows/main.yml

on: [push]

jobs:
  deploy:
    runs-on: ubuntu-latest
    name: Tencent Cloudbase Github Action Example
    steps:
      - name: Checkout
        uses: actions/checkout@v2
      - name: Deploy static to Tencent CloudBase
        id: deployStatic
        uses: TencentCloudBase/[email protected]
        with:
          secretId: ${{ secrets.SECRET_ID }}
          secretKey: ${{ secrets.SECRET_KEY }}
          envId: ${{ secrets.ENV_ID }}
          staticSrcPath: build

在项目 Setting/ Secrets 里设置 SECRET_ID, SECRET_KEY, ENV_ID 信息

提交代码到 Github 时,就会自动部署到云开发到静态托管中

谁在用 Tencent CloudBase Github Action

cloudbase-action's People

Contributors

binggg avatar dependabot[bot] avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.