Skip to content

Deploy Hexo to Tencent Cloudbase environment

Actions
Build hexo source code and upload it to Tencent cloud static website hosting
1.0.0
Latest
Star (1)

Deply hexo to Tecent cloud

View Action License: MIT

This Github Action automating hexo deployment workflow, to allow you to leverage GitHub Actions to publish your hexo site on Tencent Cloudbase environemnt to achieve static web hosting.

Recommened: flow

About Tencent Static Web Hosting: Link. It's free. About 5GB cloud storage, 5GB cloud database, 1000Gbs cloud function every month.:stuck_out_tongue_winking_eye:

Usage

Inputs

argument Required Description
cloud_secret_id yes Access key of cloud development: secretId
cloud_secret_key yes Access key of cloud development: secretKey
cloud_env_id yes Cloud development environment ID: envId

Getting secretId and secretKey by Visiting Tencent Cloud Access management.

Gettting envId by visiting Tencent Cloudbase development console.

About secretId, secretKey and envId, you can visit this website which can guide you to get your secretId secretKey and envId.

Notice

cloudbaserc.json file which is used by cloudbase-action is not needed.

For installing third party node modules, please make sure there is a package.json file in your hexo project.

Example

name: Deploy To Tencent Cloud

on:
  [push] # event

jobs:
  build: # job1 id
    runs-on: ubuntu-latest # Ubuntu Version

    name: A job to deploy blog.
    steps:
    - name: Checkout 
      uses: actions/checkout@v1 
      with: # condition
        submodules: true # Checkout private submodules(themes or something else).

    - name: Deploy Hexo to Tencent Cloudbase environment
      uses: elfisworking/[email protected]
      with:
        cloud_secret_id: ${{ secrets.QCLOUDAPIKEYID }}
        cloud_secret_key: ${{ secrets.QCLOUDAPIKEY }}
        cloud_env_id: ${{ secrets.QCLOUDENVID }}

    - name: Send mail
      if: always()
      uses: dawidd6/action-send-mail@v2
      with:
        # mail server settings
        server_address: smtp.exmail.qq.com
        server_port: 465
        # user credentials
        username: ${{ secrets.EMAIL_USERNAME }}
        password: ${{ secrets.EMAIL_PASSWORD }}
        # email subject
        subject: ${{ github.job }} job of ${{ github.repository }} has ${{ job.status }}
        # email body as text
        body: ${{ github.job }} job in worflow ${{ github.workflow }} of ${{ github.repository }} has ${{ job.status }}
        # comma-separated string, send email to
        to: [email protected]
        # from email name
        from: Service_bot

About ${{ secrets.QCLOUDAPIKEYID }} and so on, you can set it in repo's setting.

secret

Reference

License

The scripts and documentation in this project are released under the MIT License

Deploy Hexo to Tencent Cloudbase environment is not certified by GitHub. It is provided by a third-party and is governed by separate terms of service, privacy policy, and support documentation.

About

Build hexo source code and upload it to Tencent cloud static website hosting
1.0.0
Latest

Deploy Hexo to Tencent Cloudbase environment is not certified by GitHub. It is provided by a third-party and is governed by separate terms of service, privacy policy, and support documentation.