Hello World
Welcome to Hexo! This is your very first post. Check documentation for more info. If you get any problems when using Hexo, you can find the answer in troubleshooting or you can ask me on GitHub.
Quick StartCreate a new post1$ hexo new "My New Post"
More info: Writing
Run server1$ hexo server
More info: Server
Generate static files1$ hexo generate
More info: Generating
Deploy to remote sites1$ hexo deploy
More info: Deployment
自动化部署配置webhooks
创建GitHub项目首先在github上新建一个Hexo项目用于后续操作,然后再服务器上找一个文件目录clone项目,在服务器下拉代码需要先配置好自己的github ssh
服务器配置配置deploy.sh脚本123456789101112131415# !/bin/shPROJECT_DIR="项目目录"echo 'start'cd $PROJECT_DIRgit reset --hard origin/master && git clean -fgit pull && git checkout masterecho 'run npm script'npm run buildecho 'finished'
配置JavaScript文件123456789101112131415161718192021222324252627// deploy.jsvar http = require('http')var createHandler = require( ...