Skip to content
cloud

GitHub Action

Deploy Mkdocs To Tencent COS

v0.1.0-release Latest version

Deploy Mkdocs To Tencent COS

cloud

Deploy Mkdocs To Tencent COS

Automatic Deploy your mkdocs site to tencent cos, for faster accessing in China network

Installation

Copy and paste the following snippet into your .yml file.

              

- name: Deploy Mkdocs To Tencent COS

uses: aschenmaker/mkdocs-deploy-tencentcos@v0.1.0-release

Learn more about this action in aschenmaker/mkdocs-deploy-tencentcos

Choose a version

GitHub Action to deploy MkDocs site to Tencent Cos

GitHub Badge

部署Mkdocs到腾讯云COS静态网站

Intro

推送触发,GitHub Action进行构建,并自动推送到腾讯云COS。通过设置COS域名,实现静态网站访问。

Example

在对应的 mkdocs git仓库中创建.github/workflows/deploy.yml

name: Deploy to tencent osss
on:
  push:
    branches:
      - master

jobs:
  build:
    name: Deploy docs
    runs-on: ubuntu-latest
    steps:
      - name: Checkout main
        uses: actions/checkout@v2

      - name: Deploy to tencent osss
        uses: aschenmaker/mkdocs-deploy-tencentcos@master
        env:
          CONFIG_FILE: mkdocs.yml
          SECRET_ID: ${{ secrets.SECRET_ID }}
          SECRET_KEY: ${{ secrets.SECRET_KEY }}
          BUCKET: ${{ secrets.BUCKET }}
          REGION: ap-nanjing

SECRET_ID,SECRET_KEY,BUCKET需要设置在仓库Settings-Secret中进行配置

参数 说明 是否必须
CONFIG_FILE 配置文件位置
SECRET_ID API密钥,腾讯云中获取
SECRET_KEY API-key,腾讯云中获取
BUCKET 存储桶名称
REGION 存储桶位置