事情原因
码云把我的仓库给封了,其中仓库的内容为 public 生成的文件夹内容
本地内容推送至仓库
部署服务器过程
直接在服务器上安装 git,nodejs,hexo,直接hexo s -p 80
运行起来
1 | # 1. 配置 node.js 安装源 |
绑定域名
详情参考:注册阿里云域名,并绑定自己的服务器
后续操作问题
2022-02-09 19:41:28
1、本地编辑文件,使用 idea commit,push
2、登录服务器,进行 sh hexo.sh
更新即可
后续操作问题(废弃)
1、本地编辑文件,使用 idea commit,push
2、登录服务器,进行 sh hexo.sh
更新即可
3、可能会存在 hexo 不稳定的情况。(不知道为什么,我执行 hexo s -p 80 &
,明明后台运行,但是不是会结束进程)
解决方法:写一个脚本,定时去判断是否启动,如果未启动,就让它启动就行了。
1 | # EOF 加单引号,防止 EOF的 body 进行转义 |
使用 crontab -e
添加一行内容:* * * * * /usr/bin/sh /root/hexo.sh
运行本地容器:docker run --name centos01 -p 18019:18019 -itd --privileged=true --restart=always a1697752105/centos /usr/sbin/init