Skip to content

Commit

Permalink
init
Browse files Browse the repository at this point in the history
  • Loading branch information
Neige7 committed Jun 19, 2023
1 parent 3a11751 commit 1246e43
Show file tree
Hide file tree
Showing 84 changed files with 14,472 additions and 0 deletions.
102 changes: 102 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
name: Workflow Build
on:
push:
branches:
- main
jobs:
# 自动部署GitPage
gitpage:
runs-on: ubuntu-latest
steps:
# 拉取代码
- name: Checkout
uses: actions/checkout@master
with:
persist-credentials: false
# 编译出静态页面
- name: Install and Build
run: npm install && npm run build
# 塞进gh-pages分支(即部署到GitPage)
- name: Deploy
uses: JamesIves/github-pages-deploy-action@releases/v3
with:
ACCESS_TOKEN: ${{ secrets.ACCESS_TOKEN }}
BRANCH: gh-pages
FOLDER: build
# 自动生成PDF
pdf:
needs: [ gitpage ]
runs-on: ubuntu-latest
steps:
# 拉取代码
- name: Checkout
uses: actions/checkout@master
with:
persist-credentials: false
# 睡会儿, 等GitPage部署完成
- name: Sleep for 120 seconds
run: sleep 120s
shell: bash
# 生成PDF
- name: Build PDF
run: sudo docker run --rm -v ${{ github.workspace }}/pdf:/app/pdf iseason/docusaurus-to-pdf -u https://neige7.github.io/Banker-Wiki/intro --output pdf/Banker-Wiki.pdf
# 生成英文PDF
# - name: Build English PDF
# run: sudo docker run --rm -v ${{ github.workspace }}/pdf:/app/pdf iseason/docusaurus-to-pdf -u https://neige7.github.io/Banker-Wiki/en/intro --output pdf/Banker-Wiki-English.pdf
# 上传PDF
- name: Capture Build Artifacts
uses: actions/upload-artifact@v3
with:
name: Artifacts
path: pdf/
if-no-files-found: error
# Release
release:
needs: [ pdf ]
runs-on: ubuntu-latest
steps:
# 拉取代码
- name: Checkout Repository
uses: actions/checkout@v2
# 下载本体
- name: Download Content
uses: actions/download-artifact@v2
with:
name: Artifacts
# 获取序号
- name: Get Project version
id: get_version
run: |
echo "Project version: $GITHUB_RUN_NUMBER"
echo "::set-output name=project_version::$GITHUB_RUN_NUMBER"
env:
project_version: ${{ steps.get_version.outputs.project_version }}
# 创建release
- name: Create Release
id: create-new-release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ steps.get_version.outputs.project_version }}
release_name: Auto Release ${{ steps.get_version.outputs.project_version }}
# 向release上传Banker-Wiki.pdf
- name: Upload PDF file to Release
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create-new-release.outputs.upload_url }}
asset_path: Banker-Wiki.pdf
asset_name: Banker-Wiki.pdf
asset_content_type: application/zip
# 向release上传Banker-Wiki-English.pdf
# - name: Upload PDF file to Release
# uses: actions/upload-release-asset@v1
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# with:
# upload_url: ${{ steps.create-new-release.outputs.upload_url }}
# asset_path: Banker-Wiki-English.pdf
# asset_name: Banker-Wiki-English.pdf
# asset_content_type: application/zip
20 changes: 20 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Dependencies
/node_modules

# Production
/build

# Generated files
.docusaurus
.cache-loader

# Misc
.DS_Store
.env.local
.env.development.local
.env.test.local
.env.production.local

npm-debug.log*
yarn-debug.log*
yarn-error.log*
41 changes: 41 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# Website

This website is built using [Docusaurus 2](https://docusaurus.io/), a modern static website generator.

### Installation

```
$ yarn
```

### Local Development

```
$ yarn start
```

This command starts a local development server and opens up a browser window. Most changes are reflected live without having to restart the server.

### Build

```
$ yarn build
```

This command generates static content into the `build` directory and can be served using any static contents hosting service.

### Deployment

Using SSH:

```
$ USE_SSH=true yarn deploy
```

Not using SSH:

```
$ GIT_USER=<Your GitHub username> yarn deploy
```

If you are using GitHub pages for hosting, this command is a convenient way to build the website and push to the `gh-pages` branch.
3 changes: 3 additions & 0 deletions babel.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module.exports = {
presets: [require.resolve('@docusaurus/core/lib/babel/preset')],
};
17 changes: 17 additions & 0 deletions docs/Fork仓库.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
sidebar_position: 2
---

# Fork仓库

* 点击本仓库右上角的Fork按钮

![](_images/Fork按钮.png)

* 取消勾选`Copy the main branch only`选项

* 随便改一个`Repository name`, 比如你可以改成`XXX-Wiki`(后文的教学中将默认你的仓库名称是`XXX-Wiki`)

* 点击`Create fork`

![](_images/Fork选项.png)
Binary file added docs/_images/ACCESS_TOKEN.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/_images/Actions.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/_images/Action权限.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/_images/AddSecret.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/_images/DeveloperSettings.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/_images/Fork按钮.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/_images/Fork选项.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/_images/General.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/_images/GenerateNewToken.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/_images/GenerateNewTokenClassic.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/_images/Github头像.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/_images/NewRepositorySecret.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/_images/Note.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/_images/Pages.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/_images/PersonalAccessTokens.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/_images/Save.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/_images/SavePage.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/_images/SecretsAndVariables.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/_images/Settings.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/_images/SettingsActions.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/_images/TokensClassic.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/_images/cmd.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/_images/generate.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/_images/nodejs1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/_images/nodejs2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/_images/nodejs安装包.png
Binary file added docs/_images/nodejs官网.png
Binary file added docs/_images/pages分支.png
Binary file added docs/_images/repo.png
Binary file added docs/_images/token.png
Binary file added docs/_images/下载依赖.png
Binary file added docs/_images/切换盘符.png
Binary file added docs/_images/切换目录.png
Binary file added docs/_images/头像后Settings按钮.png
Binary file added docs/_images/查看路径.png
Binary file added docs/_images/查看链接.png
Binary file added docs/_images/根目录.png
Binary file added docs/_images/永不过期.png
Binary file added docs/_images/点击目录.png
Binary file added docs/_images/管理员身份运行.png
Binary file added docs/_images/选择分支.png
7 changes: 7 additions & 0 deletions docs/intro.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
sidebar_position: 1
---

# Docusaurus 插件文档模板

跟着模板走, 文档不用愁
7 changes: 7 additions & 0 deletions docs/下载仓库.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
sidebar_position: 6
---

# 下载仓库

* 我不管你用什么方法, 你给我把东西下载下来
37 changes: 37 additions & 0 deletions docs/下载依赖.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
---
sidebar_position: 7
---

# 下载依赖

* 进入根目录

![](_images/根目录.png)

* windows左下角放大镜, 搜索命令提示符

![](_images/cmd.png)

* 管理员身份运行

![](_images/管理员身份运行.png)

* 点击查看根目录

![](_images/点击目录.png)

* 查看路径

![](_images/查看路径.png)

* 输入`盘符ID:`切换盘符

![](_images/切换盘符.png)

* 输入`cd 路径`切换目录

![](_images/切换目录.png)

* 输入`npm ci`下载依赖

![](_images/下载依赖.png)
25 changes: 25 additions & 0 deletions docs/下载安装nodejs.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
---
sidebar_position: 5
---

# 下载安装nodejs

* 进入[nodejs官网](https://nodejs.org/en)

* 俩绿油油的大按钮, 随便点一个下载

![](_images/nodejs官网.png)

* 得到nodejs安装包

![](_images/nodejs安装包.png)

* 启动

![](_images/nodejs1.png)

* 无脑Next, 然后Install

![](_images/nodejs2.png)

* 点个Finish, 结束
30 changes: 30 additions & 0 deletions docs/开冲.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
---
sidebar_position: 11
---

# 开冲

`.md`文件全塞在`docs`文件夹里, 每个`.md`文件内部最上方有一个

```md
---
sidebar_position: 1
---
```

后面那个数字是当前文件在侧边栏的显示优先级, 1在2上面

如果需要多级标题, 就新建一个文件夹, 文件夹里塞一个`_category_.json`文件

```json
{
"position": 999,
"link": {
"type": "generated-index"
}
}
```

这里的`position``.md`文件中的`sidebar_position`起一样的作用, 用于表示它在侧边栏显示的顺序

言尽于此, 我已经将所有麻烦内容的解决方法告知于你, 剩下的自己去官网学吧
6 changes: 6 additions & 0 deletions docs/折叠示例1/_category_.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"position": 999,
"link": {
"type": "generated-index"
}
}
Binary file added docs/折叠示例1/_images/测试图片.png
7 changes: 7 additions & 0 deletions docs/折叠示例1/图片测试.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
sidebar_position: 1
---

# 图片测试

![](_images/测试图片.png)
6 changes: 6 additions & 0 deletions docs/折叠示例2/_category_.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"position": 1000,
"link": {
"type": "generated-index"
}
}
7 changes: 7 additions & 0 deletions docs/折叠示例2/测试.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
sidebar_position: 2
---

# 测试

1233211234567
Loading

0 comments on commit 1246e43

Please sign in to comment.