Skip to content

Commit

Permalink
Merge branch 'master' of github.com:curder/blog
Browse files Browse the repository at this point in the history
  • Loading branch information
curder committed Sep 3, 2024
2 parents 02e5f5b + 108c636 commit f225d81
Show file tree
Hide file tree
Showing 87 changed files with 3,036 additions and 1,481 deletions.
21 changes: 14 additions & 7 deletions .github/workflows/build-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,33 +7,40 @@ on:
push:
branches:
- master
pull_request:

jobs:
deploy:
runs-on: ubuntu-18.04
runs-on: ubuntu-22.04
permissions:
contents: write
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- name: Setup Node
uses: actions/setup-node@v2.1.2
uses: actions/setup-node@v3
with:
node-version: '16.x'

- name: Cache dependencies
uses: actions/cache@v2
uses: actions/cache@v3
with:
path: '**/node_modules'
key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }}
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-node-
- name: Install packages
run: yarn install

- name: Build Docs
run: yarn prod
run: yarn build

- name: Deployment
uses: peaceiris/actions-gh-pages@v3
if: ${{ github.ref == 'refs/heads/master' }}
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./docs/.vuepress/dist
26 changes: 14 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -171,20 +171,22 @@
- [CentOS](/docs/os/centos/README.md)

- [Centos 7 服务器初始化](/docs/os/centos/centos7/centos-7-server-initialization.md)
- [如何在 CentOS 上创建 sudo 用户](/docs/os/centos/how-to-create-a-sudo-user-on-centos.md)
- [防止远程 Linux 主机自动断开 SSH 连接](/docs/os/centos/prevent-remote-linux-hosts-from-automatically-desconnecting-ssh-connections.md)
- [CentOS7 中 firewalld 防火墙的使用](/docs/os/centos/how-to-use-firewall-package-in-centos7.md)
- [使用 supervisord 管理进程](/docs/os/centos/how-to-use-supervisord-manager-processes.md)
- [如何在 CentOS 上创建 sudo 用户](/docs/os/centos/centos7/how-to-create-a-sudo-user-on-centos.md)
- [防止远程 Linux 主机自动断开 SSH 连接](/docs/os/centos/centos7/prevent-remote-linux-hosts-from-automatically-desconnecting-ssh-connections.md)
- [CentOS7 中 firewalld 防火墙的使用](/docs/os/centos/centos7/how-to-use-firewall-package-in-centos7.md)
- [使用 supervisord 管理进程](/docs/os/centos/centos7/how-to-use-supervisord-manager-processes.md)
- [CentOS7 下 LNMP 安装配置](/docs/os/centos/centos7/centos-7-lnmp-installation-and-configuration.md)
- [CentOS7 使用 yum 方式安装和配置 Nginx](/docs/os/centos/centos7/centos-7-uses-yum-way-to-install-and-configure-nginx.md)
- [CentOS7 使用 yum 方式安装和配置 php-fpm](/docs/os/centos/centos7/centos-7-uses-yum-way-to-install-and-configure-php-fpm.md)
- [CentOS7 使用 yum 方式安装和配置 MySQL](/docs/os/centos/centos7/centos-7-uses-yum-way-to-install-and-configure-mysql.md)
- [Linux 下使用定时任务每隔 N 秒钟执行任务](/docs/os/centos/centos-uses-scheduled-tasks-to-perform-tasks-every-seconds.md)
- [CentOS7 下安装配置 shadowsocks](/docs/os/centos/installing-configuration-shadowsocks-under-centos-7.md)
- [使用 yum 方式安装和配置 Nginx](/docs/os/centos/centos7/centos-7-uses-yum-way-to-install-and-configure-nginx.md)
- [使用 yum 方式安装和配置 PHP](/docs/os/centos/centos7/centos-7-uses-yum-way-to-install-and-configure-php-fpm.md)
- [使用 yum 方式安装和配置 MySQL](/docs/os/centos/centos7/centos-7-uses-yum-way-to-install-and-configure-mysql.md)
- [Linux 下使用定时任务每隔 N 秒钟执行任务](/docs/os/centos/centos7/centos-uses-scheduled-tasks-to-perform-tasks-every-seconds.md)
- [CentOS7 下安装配置 shadowsocks](/docs/os/centos/centos7/installing-configuration-shadowsocks-under-centos-7.md)
- [CentOS 下安装 PHP 拓展 Swoole](/docs/os/centos/centos7/centos-7-install-php-extension-swoole.md)
- [如何在 CentOS 7 上安装和配置 GitLab CE](/docs/os/centos/how-to-install-and-configure-gitlab-ce-on-centos-7.md)
- [如何在 CentOS 上使用 Deployer 自动部署 Laravel 应用程序](/docs/os/centos/automatically-deploy-laravel-applications-deployer-centos.md)

- [如何在 CentOS 7 上安装和配置 GitLab CE](/docs/os/centos/centos7/how-to-install-and-configure-gitlab-ce-on-centos-7.md)
- [如何在 CentOS 上使用 Deployer 自动部署 Laravel 应用程序](/docs/os/centos/centos7/automatically-deploy-laravel-applications-deployer-centos.md)
- [安装和配置Docker](/docs/os/centos/centos7/centos-7-install-and-configuration-docker.md)
- [安装Oh-My-Zsh](/docs/os/centos/centos7/centos-7-install-oh-my-zsh.md)
- [使用lua脚本在nginx上处理网站简繁体转换逻辑](/docs/os/centos/centos7/use-the-lua-script-to-process-the-simplified-traditional-conversion-logic-on-the-nginx.md)
* [Ubuntu](/docs/os/ubuntu/README.md)

- [Ubuntu 下快速搭建 LNMP 环境](/docs/os/ubuntu/ubuntu-quickly-build-lnmp-environment.md)
Expand Down
68 changes: 51 additions & 17 deletions docs/.vuepress/config.js → docs/.vuepress/config.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
const {readdirSync} = require('fs');
import {defineUserConfig} from 'vuepress'
import {defaultTheme} from 'vuepress'
import {readdirSync} from "fs";

const getFiles = (dir, filteredReadme = true) => {
return readdirSync(`docs/${dir}`, 'utf-8')
Expand All @@ -7,12 +9,19 @@ const getFiles = (dir, filteredReadme = true) => {
.map(f => `/${dir}/${f}`)
}

module.exports = {
export default defineUserConfig({
base: "/blog/",
lang: 'zh-CN',
title: '编程学习',
description: '编程学习点滴',
themeConfig: {
theme: defaultTheme({
repo: 'https://github.com/curder/blog',
docsRepo: 'https://github.com/curder/blog',
docsDir: 'docs',
docsBranch: 'master',
lastUpdatedText: '更新时间',
contributorsText: '贡献者',
editLinkText: '编辑当前页面',
navbar: [
{text: '首页', link: '/'},
{
Expand All @@ -26,22 +35,25 @@ module.exports = {
'/languages/symfony-components/'
]
},
{text: '操作系统', children: ['/os/centos/', '/os/ubuntu/', '/os/mac-os/']},
{text: '操作系统', children: ['/os/centos/centos7/', '/os/ubuntu/', '/os/mac-os/']},
{
text: "工具",
children: [
'/tools/sublime/',
'/tools/phpstorm/',
'/tools/valet/',
'/tools/vagrant/',
'/tools/google-developer-tools/'
'/tools/google-developer-tools/',
'/tools/openresty/',
]
},
{text: "其他", children: ['/others/']},
{text: "📖📚", children: [
{ text: 'Setup mac for developer', link: 'https://curder.github.io/setup-mac-for-developer/' },
{ text: 'Laravel study', link: 'https://curder.github.io/laravel-study/' }
]},
{
text: "📖📚", children: [
{text: 'Setup mac for developer', link: 'https://curder.github.io/setup-mac-for-developer/'},
{text: 'Laravel study', link: 'https://curder.github.io/laravel-study/'}
]
},
],
sidebar: {
'/languages/laravel/': [
Expand Down Expand Up @@ -124,15 +136,32 @@ module.exports = {


'/os/centos': [
{
isGroup: true,
text: 'CentOS',
children: getFiles('os/centos'),
},
{
isGroup: true,
text: 'CentOS7',
children: getFiles('os/centos/centos7'),
children: [
"/os/centos/centos7/centos-7-server-initialization",
"/os/centos/centos7/centos-7-install-oh-my-zsh",
"/os/centos/centos7/centos-7-lnmp-installation-and-configuration",
"/os/centos/centos7/centos-7-uses-yum-way-to-install-and-configure-mysql",
"/os/centos/centos7/centos-7-uses-yum-way-to-install-and-configure-nginx",
"/os/centos/centos7/centos-7-uses-yum-way-to-install-and-configure-php-fpm",
"/os/centos/centos7/centos-7-install-openresty",
"/os/centos/centos7/automatically-deploy-laravel-applications-deployer-centos",
"/os/centos/centos7/centos-7-install-and-configuration-docker",
"/os/centos/centos7/centos-7-install-nginx-proxy-manager",
"/os/centos/centos7/centos-7-install-php-extension-swoole",
"/os/centos/centos7/centos-uses-scheduled-tasks-to-perform-tasks-every-seconds",
"/os/centos/centos7/how-to-create-a-sudo-user-on-centos",
"/os/centos/centos7/how-to-install-and-configure-gitlab-ce-on-centos-7",
"/os/centos/centos7/how-to-use-firewall-package-in-centos7",
"/os/centos/centos7/how-to-use-supervisord-manager-processes",
"/os/centos/centos7/installing-configuration-shadowsocks-under-centos-7",
"/os/centos/centos7/prevent-remote-linux-hosts-from-automatically-desconnecting-ssh-connections",
"/os/centos/centos7/use-the-lua-script-to-process-the-simplified-traditional-conversion-logic-on-the-nginx",
"/os/centos/centos7/how-to-add-swap-space-on-centos-7-operating-system.md",
"/os/centos/centos7/centos-7-install-node-18x.md",
]
},
],
'/os/ubuntu': [
Expand Down Expand Up @@ -201,6 +230,11 @@ module.exports = {
text: 'Docker',
children: getFiles('tools/docker')
},
{
isGroup: true,
text: 'OpenResty',
children: getFiles('tools/openresty')
},
],

'/others': [
Expand All @@ -211,5 +245,5 @@ module.exports = {
},
],
},
}
}
}),
});
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
1 change: 1 addition & 0 deletions docs/languages/symfony-components/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@

## [Console 命令](/docs/languages/symfony-components/console.md)
## [VarDumper 组件](/docs/languages/symfony-components/var-dumper.md)
## [Finder 组件](/docs/languages/symfony-components/finder.md)
12 changes: 10 additions & 2 deletions docs/languages/symfony-components/console.md
Original file line number Diff line number Diff line change
Expand Up @@ -104,15 +104,18 @@ protected function configure()
$this->setName('user:create') // 设置命令名称
->setDescription('Create new user') // 命令简短描述
->setHelp('This command allows you to create users...') // 运行命令时使用 "--help" 选项时的完整命令描述
// ->addOption('is_admin', InputArgument::OPTIONAL, InputOption::VALUE_NONE, 'It\'s admin user.')
// ->addOption('is_admin', 'alias', InputArgument::OPTIONAL, InputOption::VALUE_NONE, 'It\'s admin user.')
// ->setDefinition([
// new InputArgument('username', InputArgument::REQUIRED, 'The username of the user.'),
// new InputOption('is_admin', InputArgument::OPTIONAL, InputOption::VALUE_NONE, 'It\'s admin user.'),
// new InputOption('is_admin', 'alias', InputArgument::OPTIONAL, InputOption::VALUE_NONE, 'It\'s admin user.'),
// ])
;
}
```

- `setDescription()` 配置命令的简单描述
- `setHelp()` 运行命令时使用 "--help" 选项时的完整命令描述

### 配置用户输入

```php {8}
Expand Down Expand Up @@ -147,6 +150,11 @@ public function execute(InputInterface $input, OutputInterface $output)
return self::SUCCESS;
}
```
#### 返回值
- `return self::SUCCESS; // 0`
- `return self::FAILURE; // 1`
- `return self::INVALID; // 2`

### 执行命令

Expand Down
1 change: 1 addition & 0 deletions docs/languages/symfony-components/finder.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Finder
8 changes: 0 additions & 8 deletions docs/os/centos/README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,2 @@
# CentOS

* [如何在CentOS上创建sudo用户](/docs/os/centos/how-to-create-a-sudo-user-on-centos.md)
* [防止远程Linux主机自动断开SSH连接](/docs/os/centos/prevent-remote-linux-hosts-from-automatically-desconnecting-ssh-connections.md)
* [CentOS7中firewalld防火墙的使用](/docs/os/centos/how-to-use-firewall-package-in-centos7.md)
* [使用supervisord管理进程](/docs/os/centos/how-to-use-supervisord-manager-processes.md)
* [Linux下使用定时任务每隔N秒钟执行任务](/docs/os/centos/centos-uses-scheduled-tasks-to-perform-tasks-every-seconds.md)
* [CentOS7下安装配置shadowsocks](/docs/os/centos/installing-configuration-shadowsocks-under-centos-7.md)
* [如何在CentOS 7上安装和配置GitLab CE](/docs/os/centos/how-to-install-and-configure-gitlab-ce-on-centos-7.md)
* [如何在CentOS上使用Deployer自动部署Laravel应用程序](/docs/os/centos/automatically-deploy-laravel-applications-deployer-centos.md)
25 changes: 19 additions & 6 deletions docs/os/centos/centos7/README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,21 @@
# CentOS7

* [Centos 7 服务器初始化](/docs/os/centos/centos7/centos-7-server-initialization.md)
* [CentOS7下LNMP安装配置](/docs/os/centos/centos7/centos-7-lnmp-installation-and-configuration.md)
- [CentOS7使用yum方式安装和配置Nginx](/docs/os/centos/centos7/centos-7-uses-yum-way-to-install-and-configure-nginx.md)
- [CentOS7使用yum方式安装和配置php-fpm](/docs/os/centos/centos7/centos-7-uses-yum-way-to-install-and-configure-php-fpm.md)
- [CentOS7使用yum方式安装和配置MySQL](/docs/os/centos/centos7/centos-7-uses-yum-way-to-install-and-configure-mysql.md)
* [CentOS下安装PHP拓展Swoole](/docs/os/centos/centos7/centos-7-install-php-extension-swoole.md)
* [Centos 7 服务器初始化](/os/centos/centos7/centos-7-server-initialization.md)
* [如何在CentOS上创建sudo用户](/os/centos/centos7/how-to-create-a-sudo-user-on-centos.md)
* [LNMP安装配置](/os/centos/centos7/centos-7-lnmp-installation-and-configuration.md)
- [使用yum方式安装和配置Nginx](/os/centos/centos7/centos-7-uses-yum-way-to-install-and-configure-nginx.md)
- [使用yum方式安装和配置php-fpm](/os/centos/centos7/centos-7-uses-yum-way-to-install-and-configure-php-fpm.md)
- [使用yum方式安装和配置MySQL](/os/centos/centos7/centos-7-uses-yum-way-to-install-and-configure-mysql.md)
* [CentOS下安装PHP拓展Swoole](/os/centos/centos7/centos-7-install-php-extension-swoole.md)
* [如何在CentOS 7上安装和配置GitLab CE](/os/centos/centos7/how-to-install-and-configure-gitlab-ce-on-centos-7.md)
* [CentOS7中firewalld防火墙的使用](/os/centos/centos7/how-to-use-firewall-package-in-centos7.md)
* [使用Deployer自动部署Laravel应用程序](/os/centos/centos7/automatically-deploy-laravel-applications-deployer-centos.md)
* [Linux下使用定时任务每隔N秒钟执行任务](/os/centos/centos7/centos-uses-scheduled-tasks-to-perform-tasks-every-seconds.md)
* [使用supervisord管理进程](/os/centos/centos7/how-to-use-supervisord-manager-processes.md)
* [安装配置shadowsocks](/os/centos/centos7/installing-configuration-shadowsocks-under-centos-7.md)
* [防止远程Linux主机自动断开SSH连接](/os/centos/centos7/prevent-remote-linux-hosts-from-automatically-desconnecting-ssh-connections.md)
* [安装和配置Docker](/os/centos/centos7/centos-7-install-and-configuration-docker.md)
* [安装Oh-My-Zsh](/os/centos/centos7/centos-7-install-oh-my-zsh.md)
* [使用lua脚本在nginx上处理网站简繁体转换逻辑](/os/centos/centos7/use-the-lua-script-to-process-the-simplified-traditional-conversion-logic-on-the-nginx.md)
* [安装Openresty](/os/centos/centos7/centos-7-install-openresty.md)
* [如何在 CentOS 7 上新增 swap 分区](/os/centos/centos7/how-to-add-swap-space-on-centos-7-operating-system.md)
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# 如何在CentOS上使用Deployer自动部署Laravel应用程序
# 使用Deployer自动部署Laravel应用程序

[Laravel](https://laravel.com)是一个开放源代码的PHP Web框架,旨在简化认证,路由和缓存等常见Web开发任务。[Deployer](https://deployer.org)
是一款开源的PHP部署工具,它为许多流行的框架提供了开箱即用的支持,包括`Laravel``CodeIgniter``Symfony``Zend Framework`等等。
Expand Down Expand Up @@ -572,7 +572,7 @@ dep deploy -vvv

现在,您的应用程序将正常工作。如果您访问服务器的域名(`http://example.com`),您将看到以下登录页面:

<img :src="$withBase('/images/os/centos7/automatically-deploy-laravel-applications-deployer-centos/deployerimg.png')" alt="">
![](./images/automatically-deploy-laravel-applications-deployer-centos/deployerimg.png)

当配置完上面的配置之后,每次开发场景不需要如此复杂的操作。

Expand Down
Loading

0 comments on commit f225d81

Please sign in to comment.