|
|
| 第99行: |
第99行: |
| git checkout ejs_vue | | git checkout ejs_vue |
| </pre> | | </pre> |
| == 定时拉取代码 ==
| |
| === crontab ===
| |
| {{shc|<syntaxhighlight lang="bash">
| |
| crontab -e</syntaxhighlight>|$}}
| |
| {{hc|/tmp/crontab.90pWnh|<syntaxhighlight lang="text">
| |
| */1 * * * * cd /root/vue-webpack/;/usr/local/bin/git pull origin ejs_vue
| |
| </syntaxhighlight>}}
| |
| 如果服务器端需要编译,可能会导致冲突
| |
| <syntaxhighlight lang="javascript">
| |
| 0 */1 * * * cd /root/vue-webpack/;/usr/bin/git fetch --all;/usr/bin/git reset --hard origin/ejs_vue;/usr/bin/git pull origin ejs_vue;/usr/local/bin/npm run dev</syntaxhighlight>
| |
|
| |
| === PHP ===
| |
| <syntaxhighlight lang="php">
| |
| exec("cd /root/vue-webpack/;/usr/local/bin/git pull origin ejs_vue");</syntaxhighlight>
| |
| === 密码 ===
| |
|
| |
| == 新建分支 == | | == 新建分支 == |
| {| class="wikitable" | | {| class="wikitable" |