Skip to content

Commit

Permalink
init
Browse files Browse the repository at this point in the history
  • Loading branch information
yong.teng committed Nov 28, 2023
1 parent 0fe84f0 commit 27d0077
Show file tree
Hide file tree
Showing 105 changed files with 6,881 additions and 24 deletions.
39 changes: 39 additions & 0 deletions .github/workflows/deployment.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: BuessionSpringboot-docs CI

on:
push:
branches:
- master

jobs:
build:
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [12.x]

steps:
- uses: actions/checkout@v1
- name: 1. set environment
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: 2. install dep
run: |
rm -rf node_modules
npm install ydoc -g
yarn --frozen-lockfile
ydoc build
env:
CI: true

- name: 3. script deploy
env:
DEPLOY_ACCESS_TOKEN: ${{ secrets.DEPLOY_ACCESS_TOKEN }}
PUBLISH_BRANCH: gh-pages
PUBLISH_DIR: ./_site
CNAME: springboot.buession.com
run: |
chmod +x ./scripts/deploy.sh
bash ./scripts/deploy.sh
25 changes: 3 additions & 22 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,22 +1,3 @@
### AL ###
#Template for AL projects for Dynamics 365 Business Central
#launch.json folder
.vscode/
#Cache folder
.alcache/
#Symbols folder
.alpackages/
#Snapshots folder
.snapshots/
#Testing Output folder
.output/
#Extension App-file
*.app
#Rapid Application Development File
rad.json
#Translation Base-file
*.g.xlf
#License-file
*.flf
#Test results file
TestResults.xml
.DS_Store
_site/
node_modules/
30 changes: 28 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,28 @@
# canal.buession.com
Buession Canal 文档
# Buession Canal 文档

该站点基于 ydoc 构建而成,网站内容在 src 文件夹内,格式为 Markdown。欢迎 issue 或 pull request。

## 开发

```bash
$ npm install ydoc # or yarn ydoc
$ cd springboot.buession.com
$ ydoc serve
```

## 部署

本仓库使用的是 Github Actions 分支进行自动部署。

## 如何参与贡献

目前网站处于开发状态,我们会定期更新。欢迎大家:

- 修复错别字或错误的书写格式
- 修正不准确的描述

## 贡献

目前网站还处于开发的状态,急需大家多多支持!

最新的文档贡献情况可以参阅 GitHub 提供的 [contributors](https://github.com/buession/canal.buession.com/graphs/contributors) 页面。
69 changes: 69 additions & 0 deletions scripts/deploy.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
# !/bin/bash
set -e

function print_error() {
echo -e "\e[31mERROR: ${1}\e[m"
}

function print_info() {
echo -e "\e[36mINFO: ${1}\e[m"
}

if [ -z "${PUBLISH_DIR}" ]; then
echo "【致命错误】:workflows尚未设置 PUBLISH_DIR"
exit 1
fi

if [ -d "$(pwd)${PUBLISH_DIR}" ]; then
echo "【致命错误】:PUBLISH_DIR 尚未生成"
exit 1
fi

if [ -z "${PUBLISH_BRANCH}" ]; then
print_error "【致命错误】:没有发现 PUBLISH_BRANCH"
exit 1
fi

cd "${PUBLISH_DIR}" # ./_site

# 设置CNAME
if [ -n "${CNAME}" ]; then
echo "${CNAME}" > CNAME
fi

echo "DEPLOY_ACCESS_TOKEN: ${DEPLOY_ACCESS_TOKEN}"
# 配置ssh
if [ -n "${DEPLOY_ACCESS_TOKEN}" ]; then
print_info "设置 DEPLOY ACCES TOKEN"

SSH_DIR="${HOME}/.ssh"
mkdir "${SSH_DIR}"
ssh-keyscan -t rsa github.com >"${SSH_DIR}/known_hosts"
echo "${DEPLOY_ACCESS_TOKEN}" >"${SSH_DIR}/id_rsa"
chmod 400 "${SSH_DIR}/id_rsa"
cat "${SSH_DIR}/id_rsa"
GIT_REPOSITORY_URL="[email protected]:${GITHUB_REPOSITORY}.git"
fi

# 配置git
git init
git checkout --orphan "${PUBLISH_BRANCH}" # 积累无数次commit,不算分支

git config user.name "${GITHUB_ACTOR}"
git config user.email "${GITHUB_ACTOR}@users.noreply.github.com"

git remote rm origin || true
git remote add origin "${GIT_REPOSITORY_URL}"

# 更改时区
cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime

pushlist_time="$(date '+%Y-%m-%d %H:%M:%S')"

# git提交
git add .
git commit -m "【部署】:${pushlist_time}"

git push origin -f "${PUBLISH_BRANCH}"

print_info "${GITHUB_SHA} 部署成功:${pushlist_time}"
17 changes: 17 additions & 0 deletions src/NAV.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# YDoc
![logo](ydoc/images/logo.png)

* [主页](/)
* [文档](/docs/quickstart.md)
* [参考手册](/manual/index.md)
* [技术支持](/support.html)
## 生态
* [Buession Framework](https://wwww.buession.com/)
* [Buession Security](https://security.buession.com/)
* [Buession Logging](https://logging.buession.com/)
* [Buession Canal](https://canal.buession.com/)
* [Buession SpringBoot](https://springboot.buession.com/)
* [Buession SpringCloud](https://springcloud.buession.com/)
* [Buession Cas](https://cas.buession.com/)
* [Buession Prototype](https://prototype.buession.com/)
* [Buession Shirojs](https://shirojs.buession.com/)
4 changes: 4 additions & 0 deletions src/about/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<h1>About</h1>
<p>
...
</p>
15 changes: 15 additions & 0 deletions src/docs/SUMMARY.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Summary

### 介绍

* [框架介绍](intro.md)
* [开源协议](license.md)
* [模块说明](module.md)

### 快速开始

* [快速入门](quickstart.md)
* [版本说明](version.md)
* [安装](installation.md)
* [环境要求](requirement.md)
* [安装及使用](installation.md)
1 change: 1 addition & 0 deletions src/docs/guide.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
文档完善中
2 changes: 2 additions & 0 deletions src/docs/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# ydoc
This is home page of documents book.
28 changes: 28 additions & 0 deletions src/docs/installation.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# 安装及使用


### Maven 中央仓库搜索
* [https://mvnrepository.com/search?q=com.buession.springboot](https://mvnrepository.com/search?q=com.buession.springboot)
* [https://search.maven.org/search?q=g:com.buession.springboot](https://search.maven.org/search?q=g:com.buession.springboot)

### 手动编译
```shell
git clone https://github.com/buession/buession-springboot
cd buession-springboot/buession-springboot-parent && mvn clean install
```

### Maven
```xml
<dependency>
<groupId>com.buession.springboot</groupId>
<artifactId>buession-springboot-xxx</artifactId>
<version>x.x.x</version>
</dependency>
```

### Gradle
```gradle
compile group: 'com.buession.springboot', name: 'buession-springboot-xxx', version: 'x.x.x'
```

其中,artifactId 中的 xxx 表示对应的子模块;version 中的 x.x.x 代表版本号,根据需要使用特定版本,建议使用 maven 仓库中已构建好的最新版本[![Maven Central](https://img.shields.io/maven-central/v/com.buession.springboot/buession-springboot-boot.svg)](https://search.maven.org/search?q=g:com.buession.springboot)的包。
5 changes: 5 additions & 0 deletions src/docs/intro.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# 框架介绍


### Buession SpringBoot 框架是什么?
基于 Spring Boot 2 的便捷使用扩展,[![Buession Framework](https://www.buession.com/)]![Buession Security](https://security.buession.com/)] 类库的自动配置。
Loading

0 comments on commit 27d0077

Please sign in to comment.