-
Notifications
You must be signed in to change notification settings - Fork 60
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
556 additions
and
63 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -26,18 +26,18 @@ jobs: # 工作流 | |
with: | ||
node-version: ${{ matrix.node-version }} # 版本 | ||
#------------------------------------------------------------------- | ||
- name: Configure Private Key #★★★★★★步骤3:设置ssh | ||
- name: Configure Private Key #★★★★★★ 步骤3:设置ssh ★★★★★★ | ||
env: | ||
SSH_PRIVATE_KEY: ${{ secrets.GITEE_RSA_PRIVATE_KEY }} | ||
SSH_PRIVATE_KEY: ${{ secrets.GITEE_RSA_PRIVATE_KEY }} # gitee的ssh | ||
run: | | ||
mkdir -p ~/.ssh | ||
echo "$SSH_PRIVATE_KEY" > ~/.ssh/id_rsa | ||
chmod 600 ~/.ssh/id_rsa | ||
echo "StrictHostKeyChecking no" >> ~/.ssh/config | ||
- name: Push Gitee Mirror #★★★★★★步骤4:推送到gitee | ||
- name: Push Gitee Mirror #★★★★★★ 步骤4:推送到gitee★★★★★★ | ||
env: | ||
SOURCE_REPO: 'https://github.com/oddfar/notes.git' | ||
DESTINATION_REPO: '[email protected]:oddfar/notes.git' | ||
SOURCE_REPO: 'https://github.com/oddfar/notes.git' #github 仓库地址 | ||
DESTINATION_REPO: '[email protected]:oddfar/notes.git' #gitee 仓库地址 | ||
run: | | ||
git clone --mirror "$SOURCE_REPO" && cd `basename "$SOURCE_REPO"` | ||
git remote set-url --push origin "$DESTINATION_REPO" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,15 +5,13 @@ | |
- [准备](#%E5%87%86%E5%A4%87) | ||
- [写作](#%E5%86%99%E4%BD%9C) | ||
- [部署](#%E9%83%A8%E7%BD%B2) | ||
- [手动部署到github](#%E6%89%8B%E5%8A%A8%E9%83%A8%E7%BD%B2%E5%88%B0github) | ||
- [自动部署到github](#%E8%87%AA%E5%8A%A8%E9%83%A8%E7%BD%B2%E5%88%B0github) | ||
- [手动部署到 GitHub](#%E6%89%8B%E5%8A%A8%E9%83%A8%E7%BD%B2%E5%88%B0-github) | ||
- [自动部署到 GitHub](#%E8%87%AA%E5%8A%A8%E9%83%A8%E7%BD%B2%E5%88%B0-github) | ||
- [部署到自己服务器](#%E9%83%A8%E7%BD%B2%E5%88%B0%E8%87%AA%E5%B7%B1%E6%9C%8D%E5%8A%A1%E5%99%A8) | ||
|
||
<!-- END doctoc generated TOC please keep comment here to allow auto update --> | ||
|
||
使用[vuepress](https://vuepress.vuejs.org/zh)搭建,自动部署在[GitHub Pages](https://pages.github.com/) | ||
|
||
使用[vdoing](https://github.com/xugaoyi/vuepress-theme-vdoing)主题 | ||
使用 [vuepress](https://vuepress.vuejs.org/zh) 搭建,自动部署在[GitHub Pages](https://pages.github.com/) | ||
|
||
## 准备 | ||
|
||
|
@@ -22,7 +20,7 @@ VuePress 需要 [Node.js ](https://nodejs.org/en/)>= 8.6 | |
1. 克隆到本地并进入目录 | ||
|
||
```sh | ||
git clone https://github.com/oddfar/docs.git && cd docs | ||
git clone https://github.com/oddfar/notes.git && cd notes | ||
``` | ||
|
||
2. 安装本地依赖 | ||
|
@@ -37,13 +35,13 @@ VuePress 需要 [Node.js ](https://nodejs.org/en/)>= 8.6 | |
npm run dev | ||
``` | ||
|
||
默认访问链接:http://localhost:8080/doc | ||
默认访问链接:http://localhost:8080/ | ||
|
||
## 写作 | ||
|
||
使用`markdown`语法编写`md`文件,所有笔记`md`文件放在`docs/docs`目录下 | ||
使用 `markdown` 语法编写`md`文件,所有笔记 `md` 文件放在 `docs/` 目录下 | ||
|
||
例如添加`test`类,并编写`hello.md`文件 | ||
例如添加 `test` 类,并编写 `hello.md` 文件 | ||
|
||
1. 创建目录 | ||
|
||
|
@@ -69,7 +67,7 @@ VuePress 需要 [Node.js ](https://nodejs.org/en/)>= 8.6 | |
hello world | ||
``` | ||
|
||
tittle:标题,不填写则默认文件名中的标题,即`hello` | ||
tittle:标题,不填写则默认文件名中的标题,即 `hello` | ||
|
||
permalink:访问链接,不填写则自动生成 | ||
|
||
|
@@ -83,35 +81,40 @@ VuePress 需要 [Node.js ](https://nodejs.org/en/)>= 8.6 | |
npm run dev | ||
``` | ||
|
||
详情请看[vdoing主题介绍文档](https://doc.xugaoyi.com/) | ||
文件及写作规范详情请看 | ||
|
||
- [vdoing主题介绍文档](https://doc.xugaoyi.com/) | ||
- [文档 - md文件写作](https://oddfar.github.io/notes/about/blog/3/) | ||
|
||
## 部署 | ||
|
||
### 手动部署到github | ||
### 手动部署到 GitHub | ||
|
||
创建分支:`gh-pages` | ||
|
||
更改文件`deploy.sh`内容 | ||
|
||
```sh | ||
[email protected]:oddfar/docs.git | ||
``` | ||
仓库地址替换成自己的: | ||
|
||
- githubUrl=[email protected]:oddfar/notes.git | ||
|
||
- githubUrl=https://oddfar:${GITHUB_TOKEN}@github.com/oddfar/notes.git | ||
|
||
- initDist "module.exports = '/notes/'" | ||
|
||
|
||
```sh | ||
githubUrl=https://oddfar:${GITHUB_TOKEN}@github.com/oddfar/docs.git | ||
``` | ||
|
||
双击运行`deploy.sh` | ||
修好完后,双击运行`deploy.sh` | ||
|
||
之后配置 [GitHub Pages](https://pages.github.com/) | ||
|
||
![image-20210517151354287](https://cdn.jsdelivr.net/gh/oddfar/static/img/20210517151356.png) | ||
|
||
### 自动部署到github | ||
### 自动部署到 GitHub | ||
|
||
|
||
|
||
详情查看:[点击此处](https://github.com/oddfar/notes/blob/master/docs/10.%E5%85%B3%E4%BA%8E/02.%E5%85%B3%E4%BA%8E%20-%20%E6%9C%AC%E7%AB%99/05.%E6%96%87%E6%A1%A3%E7%9A%84%E9%83%A8%E7%BD%B2.md) | ||
详情查看:[点击此处](https://oddfar.github.io/notes/about/blog/5/) | ||
|
||
### 部署到自己服务器 | ||
|
||
|
@@ -121,7 +124,7 @@ githubUrl=https://oddfar:${GITHUB_TOKEN}@github.com/oddfar/docs.git | |
npm run build | ||
``` | ||
|
||
生成文件在`docs\.vuepress\dist\`目录下 | ||
生成文件在 `docs\.vuepress\dist\` 目录下 | ||
|
||
打包到服务器即可 | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.