Github Action相关配置备份

提交仓库必备环境变量

GITHUBUSERNAME

GITHUBEMAIL

GITHUBTOKEN

设置远程仓库和分支

[Blogroot]/.gitignore文件应为以下内容

1
2
3
4
5
6
7
8
9
10
.DS_Store
Thumbs.db
db.json
*.log
node_modules/
public/
.deploy*/
.deploy_git*/
.idea
themes/butterfly/.git

初次连接仓库

1
git init
1
git remote add origin git@github.com:[GithubUsername]/[SourceRepo].git
1
git checkout -b master

提交变更方法

1
git add .
1
git commit -m "github action update"
1
git push origin master

回退版本

1
git reset --hard

请在该指令后添加github仓库版本ID

Github提示版本升级

合并pull request后,在本地执行git pull

查看本地hexo版本

1
npx hexo -v

执行升级

1
npm i --save

如需换源可尝试

1
>npm config set registry https://registry.npmmirror.com

成功后检查本地版本

1
npx hexo -v

hexo-bilibili-bangumi

在hexo generate或hexo deploy之前使用hexo bangumi -u命令更新追番数据,使用hexo cinema -u命令更新追剧数据!