Skip to content

elfisworking/Deply_hexo_to_Tecent_cloud

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

Build hexo and push static website to tecent cloud

Resources

License

Stars

Watchers

Forks

Packages

No packages published