Wit*_*ner 5 php git web-deployment octobercms
我为我的大多数站点设置了 Git 部署,它运行得非常好。我最近开始使用 October,对于我自己创建的主页,我想在本地工作,然后使用 Git 将新的和更新的页面部署到实时服务器。
It is my understanding that (apart from blog plugins for instance) October uses flat files for it's content. If I create files locally within my local install of October, can I safely Git push only the files I have worked on (html, css, js etc.) up to the site along with front matter and have them work on the remote deployment server? Will October just integrate them?
是的,您可以使用 git 部署站点内容并通过版本控制进行管理。
您可以将.gitignore设置为以下文件夹
.DS_Store
*.log
/vendor
/storage
/plugins/october
/modules/**/*
/config
/bootstrap
/themes/demo
artisan
index.php
.htaccess
Run Code Online (Sandbox Code Playgroud)
它会上传您添加/提交的文本/主题文件。
git pull之后,您可能希望刷新缓存
php artisan cache:clear
Run Code Online (Sandbox Code Playgroud)
或安装缓存清除小部件(https://octobercms.com/plugin/romanov-clearcachewidget)