Skip to content

Commit

Permalink
chore: use idoc build website.
Browse files Browse the repository at this point in the history
  • Loading branch information
jaywcjlove committed Apr 22, 2022
1 parent 369394c commit 6d47e86
Show file tree
Hide file tree
Showing 9 changed files with 99 additions and 14 deletions.
40 changes: 34 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,19 +14,47 @@ jobs:
node-version: 14

- run: npm install
- run: node scripts/build.mjs
- run: npm run build

- name: Generate Contributors Images
uses: jaywcjlove/github-action-contributors@main
with:
filter-author: (renovate\[bot\]|renovate-bot|dependabot\[bot\])
output: build/CONTRIBUTORS.svg
output: dist/CONTRIBUTORS.svg
avatarSize: 42

- name: Deploy
- name: Create Tag
id: create_tag
uses: jaywcjlove/create-tag-action@v1.3.6
with:
package-path: ./package.json

- name: Deploy Website
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./build
user_name: 'github-actions[bot]'
user_email: 'github-actions[bot]@users.noreply.github.com'
user_email: 'github-actions[bot]@users.noreply.github.com'
commit_message: ${{steps.tag_version.outputs.tag}} ${{ github.event.head_commit.message }}
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./dist

- name: Generate Changelog
id: changelog
uses: jaywcjlove/changelog-generator@v1.5.3
with:
token: ${{ secrets.GITHUB_TOKEN }}
filter-author: (jaywcjlove|小弟调调™|dependabot\[bot\]|Renovate Bot)
filter: (^[\s]+?[R|r]elease)|(^[R|r]elease)

- name: Create Release
uses: ncipollo/release-action@v1
if: steps.create_tag.outputs.successful
with:
token: ${{ secrets.GITHUB_TOKEN }}
name: ${{ steps.create_tag.outputs.version }}
tag: ${{ steps.create_tag.outputs.version }}
body: |
Documentation ${{ steps.changelog.outputs.tag }}: https://raw.githack.com/jaywcjlove/mysql-tutorial/${{ steps.changelog.outputs.gh-pages-short-hash }}/index.html
Comparing Changes: ${{ steps.changelog.outputs.compareurl }}
${{ steps.changelog.outputs.changelog }}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
#
.DS_Store

dist
build
node_modules
npm-debug.log
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@

<img align="right" height="150" src="./img/mysql-logo.png">

<!--idoc:ignore:start-->
MySQL入门教程
===
<!--idoc:ignore:end-->

[![](https://jaywcjlove.github.io/sb/ico/mysql.svg)](http://www.mysql.com/) [![](https://jaywcjlove.github.io/sb/ico/awesome.svg)](awesome-mysql.md) [![](https://jaywcjlove.github.io/sb/license/mit.svg)](#)

Expand Down Expand Up @@ -162,9 +164,7 @@ MariaDB,是 MySQL server 的一个由社区开发的分支,MariaDB大部分

从目录来看,看上去内容丰富,比较完整的介绍了 MySQL 数据库技术的教程,我不是`DBA`,我不是,正在看这篇文章的你,很可能也不是,不想误人子弟,在项目中应用了一段时间 MySQL,如果你是`DBA`请多多指教,文采不佳还望高抬贵手,不甚感激,小弟在这里给您鞠躬,欢迎给我纠错。

~~我想念一个女孩儿,实属无奈我得继续努力,好好读书做个有趣的人,完成我的“著作”,待我著作完成可否跟我约个会?~~

还没有写完就结婚了,欢迎大家 PR 补充完善 :)。
~~我想念一个女孩儿,实属无奈我得继续努力,好好读书做个有趣的人,完成我的“著作”,待我著作完成可否跟我约个会?~~ 还没有写完就结婚了,欢迎大家 PR 补充完善 :)。

## License

Expand Down
3 changes: 3 additions & 0 deletions docs/21-minutes-MySQL-basic-entry.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@

为什么只需要21分钟呢?因为在我们大天朝有句话叫做三七二十一,你可以不管三七二十一开始使用 `MySQL` 及快速的方式入门 `MySQL`。其实21分钟把下面语句执行一遍是没有问题的,要理解的话估计不止21分钟,对于初学者来说只需满足自己需求可以增删改查等简易的维护即可。

<!--idoc:ignore:start-->

目录
---

Expand Down Expand Up @@ -51,6 +53,7 @@
- [参考手册](#参考手册)

<!-- /TOC -->
<!--idoc:ignore:end-->

## 开始使用

Expand Down
5 changes: 4 additions & 1 deletion docs/awesome-mysql.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ Awesome MySQL
![必备][bibei Icon] 表示**必备**资源标示;
![1 star][red Icon] 表示强烈推荐的,星星的数量来表达强烈的程度;

<!--idoc:ignore:start-->

## 目录

- [手册文档](#手册文档)
Expand All @@ -22,6 +24,7 @@ Awesome MySQL
- [官方资料](#官方资料)
- [优秀文章](#优秀文章)

<!--idoc:ignore:end-->

## 手册文档

Expand Down Expand Up @@ -102,7 +105,7 @@ _一些优秀的文章_
* [一个不可思议的MySQL慢查分析与解决](http://fordba.com/optimize-an-amazing-mysql-slowlog.html)


**[⬆ 返回顶部](#目录)**
**[⬆ 返回顶部](#awesome-mysql)**


[OSS Icon]: https://jaywcjlove.github.io/sb/ico/min-oss.svg
Expand Down
29 changes: 29 additions & 0 deletions idoc.chapters.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@

#### 第1章 初识 MySQL

- chapter1/: 第1章 初识 MySQL
- chapter1/1.1.md: 数据库基础
- chapter1/1.2.md: 数据库技术构成
- chapter1/1.3.md: 什么是MySQL
- chapter1/1.4.md: 如何学习MySQL


#### 第2章 MySQL的安装与配置

- chapter2/: 第2章 MySQL 的安装与配置
- chapter2/2.1.md: Mac平台下安装与配置MySQL
- chapter2/2.2.md: Centos 平台安装与卸载MySQL
- chapter2/2.3.md: Docker 安装 MySQL
- chapter2/2.4.md: 启动数据库设置初始密码
- chapter2/2.5.md: MySQL工具
- chapter2/2.6.md: MySQL配置修改


#### 第3章 数据库的基本操作

- chapter3/: 第3章 数据库的基本操作
- chapter3/3.1.md: 连接数据库
- chapter3/3.2.md: 查看选择数据库
- chapter3/3.3.md: 创建数据库
- chapter3/3.4.md: 删除数据库
- chapter3/3.5.md: 数据库存储引擎
17 changes: 17 additions & 0 deletions idoc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@


logo: ./mysql.svg
favicon: ./mysql.svg

menus:
Home: index.html
Cheat Sheet: 21-minutes-MySQL-basic-entry.html
Awesome: awesome-mysql.html

editButton:
label: Edit this page on GitHub
url: https://github.com/jaywcjlove/mysql-tutorial/blob/master/

footer: |
Released under the MIT License. Copyright © 2022 Kenny Wong<br />
Generated by <a href="https://github.com/jaywcjlove/idoc" target="_blank">idoc</a> v{{idocVersion}}
4 changes: 4 additions & 0 deletions mysql.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
{
"name": "mysql-tutorial",
"version": "0.0.1",
"title": "MySQL 入门教程",
"description": "从零开始学习MySQL,主要是面向MySQL数据库管理系统初学者。",
"homepage": "https://jaywcjlove.github.io/mysql-tutorial",
"author": "jaywcjlove",
"license": "MIT",
"private": true,
"scripts": {
"start": "node scripts/build.mjs"
"start": "idoc --watch",
"build": "idoc"
},
"repository": {
"type": "git",
"url": "git+https://github.com/jaywcjlove/mysql-tutorial.git"
},
"devDependencies": {
"fs-extra": "^10.0.0",
"markdown-to-html-cli": "^3.2.4",
"recursive-readdir-files": "^2.0.7"
"idoc": "^1.13.1"
}
}

0 comments on commit 6d47e86

Please sign in to comment.