Fork me on GitHub

php 代码自动部署方案

方案一 使用 gitlab ci 自动部署

参考链接:https://blog.csdn.net/hxpjava1/article/details/78514999

附:一份示例配置

1
2
3
4
5
6
7
8
9
10
11
12
13
14
stages:
- deploy
deploy:
stage: deploy
script:
- sudo cp -a . /data/wwwroot/my-project
- cd /data/wwwroot/my-project
- sudo composer install
- sudo cp .env.example .env
- sudo chmod 777 -R /data/wwwroot/my-project/runtime
only:
- dev
tags:
- yunshudev

方案二 使用 deloyer 部署

参考链接:

https://laravel-china.org/articles/13242/another-introduction-to-the-use-of-deployer

------本文结束感谢阅读------
欣赏此文?求鼓励,求支持!