Skip to content

Commit

Permalink
Merge pull request #6 from learner-pm/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
learner-pm authored Mar 3, 2024
2 parents 0c8192f + 138b479 commit d4bc138
Show file tree
Hide file tree
Showing 29 changed files with 135 additions and 149 deletions.
9 changes: 3 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
# new_blog_docs
# 记录文章项目

个人博客
采用[VuePress](https://v2.vuepress.vuejs.org/zh/)来构建静态网站

- 前端内容

- 其他
- 项目
内容全属平常记录,如果不合理的方面,欢迎指出以及提 PR。
55 changes: 36 additions & 19 deletions docs/.vuepress/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ const { path } = require("@vuepress/utils");
module.exports = {
host: "localhost",
port: "8888",
title: "网站学习",
title: "个人博客",
base: "/",
description: "PM的个人学习博客",
lang: "zh-CN",
Expand All @@ -23,14 +23,14 @@ module.exports = {
link: "/frontEnd/basic/",
},
{
text: "提升",
link: "/frontEnd/frame/vueReact/",
text: "进阶",
link: "/frontEnd/frame/",
},
],
},
{
text: "数据结构和算法",
link: "/dataStructure/algorithm/",
text: "编程",
link: "/program/",
},
{
text: "项目",
Expand Down Expand Up @@ -73,31 +73,48 @@ module.exports = {
],
"/frontEnd/frame/": [
{
text: "Frame",
text: "React",
children: [
"/frontEnd/frame/vueReact/",
"/frontEnd/frame/vueReact/one",
"/frontEnd/frame/vueReact/react",
"/frontEnd/frame/React/",
],
},
{
text: "Mvvm",
children: ["/frontEnd/frame/mvvm/"],
text: "Vue",
children: [
"/frontEnd/frame/Vue/"
],
},
],
"/learn/": [
{
children: ["/learn/result.md"],
text: "其他",
children: [
"/frontEnd/frame/Other/"
],
},
],
"/dataStructure/algorithm/": [
// "/learn/": [
// {
// children: ["/learn/result.md"],
// },
// ],
"/program/": [
{
text: "数据结构",
children: [
"/program/dataStructure/",
"/program/dataStructure/tree.md",
],
},
{
text: "算法",
children: [
"/dataStructure/algorithm/",
"/dataStructure/algorithm/commonType.md",
"/dataStructure/algorithm/tree.md",
"/dataStructure/algorithm/designPatterns.md",
"/program/algorithm/",
"/program/algorithm/commonType.md",
],
},
{
text: "设计模式",
children: [
"/program/designPatterns/",
],
},
// {
Expand Down
4 changes: 2 additions & 2 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
home: true
heroImage: /images/hero.jpg
heroAlt: 风景
heroText: 网站学习
heroText: 个人博客
tagline: 学习 & 记录
actions:
- text: 开始浏览
Expand All @@ -19,7 +19,7 @@ features:
details: 学习框架内核,深入理解其核心。学习现代前端开发工程化过程。
- title: 记录和学习
details: 记录个人学习进度,记录造轮子过程,搜集面试题。
footer: Copyright © 2021-now • Wrote and built by PengMao
footer: Copyright © 2021-now • Wrote by PengM
---

<Home/>
59 changes: 54 additions & 5 deletions docs/cicd/README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,60 @@
# CICD

其目的是通过`CICD`的手段来搭建一个自动发布代码的平台 - 尝试搭建
其目的是通过`CICD`的手段来搭建一个自动发布代码的平台,简单理解就是:你只需要去编写业务代码,其他的`lint`检测、`build`构建、`deploy`发布等,你都可以不去关系,这个过程交给机器处理即可。

## 搭建流程
一般公司上通常使用`gitlab`来作为代码管理平台,其中有相关的自动部署化内容,写一些配置就可以完成一个简单的自动部署化动作。我们这里使用 GitHub 提供的[Actions](https://github.com/features/actions)来简单的实现一下。

我也是从 0 开始,以下记录构建过程。
## workflows 文件

目标:本地推送代码到 GitHub,自动 build、自动发布
首先我们需要在我们的根目录下面创建一个文件夹,路径为`/.github/workflows/`。该文件夹下存储构建相关的`yml`文件。在我们进行相关操作时,如提 pr 等,若提前编写了相关规则,就会触发 actions

### ci
## yml 文件

以下是一个构建 yml 文件,这个文件就是我这个项目的部署文件中的一个。

其中`name`就是这个文件的名字。`on`编写触发 actions 的时机和作用分支,这里即是当代码被`push``main`分支的时候就会触发工作流。

紧接着的是`jobs`,就是一个工作,可以有多个`job`。这里就一个 job,整体就是构建代码和打包推送流程。`runs-on`选择要运行的机器。`steps`代表步骤,后面基本格式就是 `name: xxx run: xxx uses: xxx with:xxx`,name 就是这个步骤的名字,run 执行什么操作,uses 使用什么工具,with 跟在 uses 后面作为一些补充信息。比如 Deploy 步骤后的 with 就是补充文件源,token 等信息

```yml
# This is a basic workflow to help you get started with Actions

name: deploy-docs-website

# Controls when the workflow will run
on:
# Triggers the workflow on push or pull request events but only for the "main" branch
push:
branches: ["main"]
# pull_request:
# branches: [ "main" ]

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
build:
# The type of runner that the job will run on
runs-on: ubuntu-latest

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2
- name: install nodejs
uses: actions/[email protected]
with:
node-version: "16.X"
- name: install deps
run: npm install
- name: build app
run: npm run docs:build
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
with:
publish_dir: docs/.vuepress/dist
github_token: ${{ secrets.ACTION_TOKEN }}
commit_message: Deploy Success
```
89 changes: 0 additions & 89 deletions docs/dataStructure/README.md

This file was deleted.

1 change: 0 additions & 1 deletion docs/dataStructure/algorithm/designPatterns/README.md

This file was deleted.

19 changes: 0 additions & 19 deletions docs/frontEnd/README.md

This file was deleted.

2 changes: 1 addition & 1 deletion docs/frontEnd/basic/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

**_JavaScript_**

- 变量
- 基础类型
- 函数
- 原型链
- This
Expand Down
1 change: 1 addition & 0 deletions docs/frontEnd/frame/Other/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# 其他
17 changes: 11 additions & 6 deletions docs/frontEnd/frame/README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,15 @@
# Learn
# 进阶

最初在校期间,我以`vue`来入门前端工程开发的道路.
该部分主要涉及框架方面以及前端得一些深入内容等

实习期间接触了`react`进行开发项目,
这样我即使用了`vue`,也使用了`react`
## React

mvc -> mvvm 模式
`React`是一门十分优先的框架。对于 React 的学习,是我在毕业后的工作才接触相关的思想和实践。该部分将主要记述我从 0 学习`React`中遇到的一些问题,以及部分工作中使用它的一些思考。

记录面试题,为了面试~~~。
## Vue

`Vue`这门框架我接触依旧,同`React`一样,它也是一门十分优秀的框架。早在我大二(2019 左右)的时候就接触了这门框架,它将我带入了前端,虽我工作中没有主要使用它,但它的一些思想和优点依旧可以去学习。

## 其他类

主要记述一些和框架无关的思考
1 change: 1 addition & 0 deletions docs/frontEnd/frame/React/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# React
1 change: 1 addition & 0 deletions docs/frontEnd/frame/Vue/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Vue
8 changes: 7 additions & 1 deletion docs/learn/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
# Take Notes
# Notes

## 2024/03/03

从今天开始继续更新文档,作为毕业后工作一段时间的总结吧。

这两天将网站重新部署到了 GitHub Page 上面,把一些目录结构做了调整,为后面编写的内容做下划分。

## 2022/10/02

Expand Down
15 changes: 15 additions & 0 deletions docs/program/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# 编程

该模块设计非前端的其他程序员需要学习的内容

## 数据结构

了解数据结构可以深入剖析一些语法的底层实现,也可以提升程序员的代码健壮性,利于编程

## 算法

好的算法可以减少代码的复杂度,可以节省`时间``空间`的消耗

## 设计模式

设计模式可以让代码`有结构`,用好设计模式可以不至于让代码太`凌乱`
File renamed without changes.
File renamed without changes.
3 changes: 3 additions & 0 deletions docs/program/dataStructure/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# 数据结构

balalal
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit d4bc138

Please sign in to comment.