Skip to content

Commit

Permalink
feat(docs): update docs gen
Browse files Browse the repository at this point in the history
update docs gen

Signed-off-by: ysicing <[email protected]>
  • Loading branch information
ysicing committed Nov 29, 2023
1 parent 3394243 commit dbb109c
Show file tree
Hide file tree
Showing 193 changed files with 371 additions and 11,130 deletions.
54 changes: 54 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: Deploy
on:
workflow_dispatch: {}
push:
branches:
- master
jobs:
deploy:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [20]
permissions:
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: pnpm/action-setup@v2
with:
version: latest
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- name: Setup Go
uses: actions/setup-go@v4
with:
go-version: ${{ env.GO_VERSION }}
check-latest: true
- name: install task
run: |
echo "install task"
go install github.com/go-task/task/v3/cmd/task@latest
- name: Build docs
run: |
task godoc
- name: Install dependencies
working-directory: docs
run: pnpm install --frozen-lockfile=false
- name: Build
working-directory: docs
run: pnpm run docs:build
- uses: actions/configure-pages@v2
- uses: actions/upload-pages-artifact@v1
with:
path: docs/.vitepress/dist
- name: Deploy
id: deployment
uses: actions/deploy-pages@v2
12 changes: 12 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,15 @@ docs/.vitepress/cache

# docs site build files
docs/.vitepress/dist

# docs gen
docs/backup
docs/bugreport
docs/experimental
docs/init
docs/status
docs/upgrade
docs/platform
docs/uninstall
docs/version
docs/cluster
2 changes: 0 additions & 2 deletions Taskfile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,7 @@ tasks:
godoc:
desc: update docs
cmds:
- rm -rf ./docs/*.md
- go run ./docs/docs.go
- cp -a README.md docs/index.md

gofmt:
cmds:
Expand Down
21 changes: 13 additions & 8 deletions docs/.vitepress/locales/en_US.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,17 @@ import { generateSidebarChapter } from './side_bar.js'
const require = createRequire(import.meta.url)

const chapters = generateSidebarChapter('en_US', new Map([
['introduction', 'Introduction'],
['install', 'Install'],
['init', 'Init'],
['backup', 'BackUP'],
['cluster', 'Cluster'],
['platform', 'Platform'],
['status', 'Status'],
['upgrade', 'Upgrade'],
['bugreport', 'Bug Report'],
['version', 'Version'],
['uninstall', 'Uninstall'],
['experimental', 'Experimental'],
]))

export default defineConfig({
Expand Down Expand Up @@ -40,12 +50,7 @@ export default defineConfig({
function nav() {
return [
{ text: 'Home', link: '/' },
{ text: 'Configuration', link: '/configuration/configuration-reference' },
{
text: 'Download',
items: [
{ text: 'Open-source Edition', link: 'https://github.com/easysoft/quickon_cli/releases/' },
]
}
{ text: 'Init', link: '/init/init' },
{ text: 'Download',link: 'https://github.com/easysoft/quickon_cli/releases/' },
]
}
49 changes: 0 additions & 49 deletions docs/api-examples.md

This file was deleted.

2 changes: 1 addition & 1 deletion docs/docs.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import (
"github.com/ergoapi/util/file"
"github.com/ergoapi/util/github"
"github.com/ergoapi/util/version"
"github.com/spf13/cobra/doc"
doc "github.com/ysicing/cobra2vitepress"
)

func main() {
Expand Down
24 changes: 12 additions & 12 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,22 +4,22 @@ layout: home

hero:
name: "Quickon Cli"
text: "命令行"
tagline: My great project tagline
text: "命令行工具"
tagline: 你值得信赖的禅道DevOPS命令行工具
actions:
- theme: brand
text: Markdown Examples
link: /markdown-examples
text: 安装
link: /install/install
- theme: alt
text: API Examples
link: /api-examples
text: 更多
link: /init/

features:
- title: Feature A
details: Lorem ipsum dolor sit amet, consectetur adipiscing elit
- title: Feature B
details: Lorem ipsum dolor sit amet, consectetur adipiscing elit
- title: Feature C
details: Lorem ipsum dolor sit amet, consectetur adipiscing elit
- title: 简单
details: 单一文件,简单易用
- title: 高效
details: 一键解决问题
- title: 开源
details: 源码开放,可自行定制
---

97 changes: 97 additions & 0 deletions docs/install/install.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
---
sidebarTitle: qcadmin backup app
sidebarOrder: 1
---

## 支持的环境

### Linux 发行版

* **Debian** *12(推荐), 11, 10*
* **Ubuntu** *20.04, 18.04*
* **CentOS** *7*
* **Rocky** *9, 8*

> 建议内核版本`5.14及之后版本`
### 容器运行时

* 内置`containerd`
* docker(本地已安装)

> 多节点时不推荐混用
### k8s/k3s版本

* 对接已有k8s集群, 推荐1.21+版本
* 默认k3s版本为`1.24`

## 要求和建议

* 最低资源要求:
* 2 核虚拟 CPU
* 4 GB 内存
* 40 GB 储存空间

* 操作系统要求:

* 节点时间同步。
* `sudo`/`curl` 节点需已安装。
* 网络正常。

> * 建议您的操作系统环境足够干净 (不安装任何其他软件),否则可能会发生冲突。
## 使用

### 安装二进制

#### 1. 从源码安装

> 需要go环境,推荐使用`1.21`
```bash
# Clone the repo
# Build and run the executable
#make generate
#make build
task local
task
```

#### 2. 二进制安装

> 使用我们提供的编译二进制文件。可以从下面或者github获取
```bash
# 稳定版本 / stable / tag (Recommended)
curl -sfL https://pkg.qucheng.com/quickon/get.sh | sh -
# 安装渠成平台
q init --provider quickon
# 安装禅道DevOPS
q init --provider devops
# 一键安装
curl -sfL https://pkg.qucheng.com/quickon/install.sh | INSTALL_DOMAIN=example.com sh -
```

#### 3. 包安装

> 目前仅提供deb或者rpm包方式安装。
```bash
# debian
echo "deb [trusted=yes] https://repo.qucheng.com/quickon/apt/ /" | tee /etc/apt/sources.list.d/quickon.list
apt update
apt search qcadmin
apt install qcadmin
# centos7
cat > /etc/yum.repos.d/quickon.repo << EOF
[quickon]
name=Quickon Repo
baseurl=https://repo.qucheng.com/quickon/yum/
enabled=1
gpgcheck=0
EOF

yum makecache
yum install qcadmin
```
6 changes: 0 additions & 6 deletions docs/introduction/ _dummy-index.md

This file was deleted.

85 changes: 0 additions & 85 deletions docs/markdown-examples.md

This file was deleted.

Loading

0 comments on commit dbb109c

Please sign in to comment.