Featured image of post 利用github实现自动部署

利用github实现自动部署

以及常用指令

自动部署

参考

【Hugo】Hugo + Github 免费部署自己的博客

均在dev文件夹下

首次部署

1
2
3
4
5
6
git init
git add .
git commit -m "first commit"
git branch -M main
git remote add origin {你的github仓库地址}
git push -u origin main

试运行

1
2
hugo server -D
ctrl + c [停止运行]

更新

在dev目录下

1
2
3
4
5
git init
git add .
git commit -m "update"
git branch -M main
git push 
使用 Hugo 构建
主题 StackJimmy 设计