Commit 414f632e authored by yanglbme's avatar yanglbme

feat: enable page site

parent af9a3f4f
name: docs
on:
# 每当 push 到 main 分支时触发部署
push:
branches: [main]
# 手动触发部署
workflow_dispatch:
jobs:
docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
# “最近更新时间” 等 git 日志相关信息,需要拉取全部提交记录
fetch-depth: 0
- name: Setup Node.js
uses: actions/setup-node@v1
with:
# 选择要使用的 node 版本
node-version: '14'
# 缓存 node_modules
- name: Cache dependencies
uses: actions/cache@v2
id: yarn-cache
with:
path: |
**/node_modules
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
# 如果缓存没有命中,安装依赖
- name: Install dependencies
if: steps.yarn-cache.outputs.cache-hit != 'true'
run: yarn --frozen-lockfile
# 运行构建脚本
- name: Build VuePress site
run: yarn docs:build
# 查看 workflow 的文档来获取更多信息
# @see https://github.com/crazy-max/ghaction-github-pages
- name: Deploy to GitHub Pages
uses: crazy-max/ghaction-github-pages@v2
with:
# 部署到 gh-pages 分支
target_branch: gh-pages
# 部署目录为 VuePress 的默认输出目录
build_dir: docs/.vuepress/dist
env:
# @see https://docs.github.com/cn/actions/reference/authentication-in-a-workflow#about-the-github_token-secret
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
\ No newline at end of file
......@@ -32,3 +32,6 @@ build/
### VS Code ###
.vscode/
node_modules
.temp
.cache
module.exports = {
lang: 'zh-CN',
title: 'Tencent Cloud IM Server SDK Document - Java',
description: '腾讯云 IM 服务端 SDK API 文档 Java 版',
base: '/qcloud-im-server-sdk-java/',
themeConfig: {
repo: 'doocs/qcloud-im-server-sdk-java',
logo: 'https://avatars.githubusercontent.com/u/43716716?s=200&v=4',
},
}
\ No newline at end of file
# Tencent Cloud IM Server SDK API
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
{
"name": "qcloud-im-server-sdk-java",
"version": "1.0.0",
"description": "腾讯云 IM 服务端 SDK API 文档 Java 版",
"main": "index.js",
"scripts": {
"docs:dev": "vuepress dev docs",
"docs:build": "vuepress build docs"
},
"repository": {
"type": "git",
"url": "git+https://github.com/doocs/qcloud-im-server-sdk-java.git"
},
"author": "",
"license": "Apache-2.0",
"bugs": {
"url": "https://github.com/doocs/qcloud-im-server-sdk-java/issues"
},
"homepage": "https://github.com/doocs/qcloud-im-server-sdk-java#readme",
"devDependencies": {
"vuepress": "^2.0.0-beta.27"
}
}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment