参考
结合了第二、三个博文中的 workflow 文件,最终实现自动化部署。Obsidian 一键上传用到了 envelope 。
我的 workflow 文件
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62
| name: Generate Hexo Blog
on: push: branches: - main
jobs: build: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 with: token: ${{ secrets.GITHUB_TOKEN }} submodules: true - name: Use Node.js 16.x uses: actions/setup-node@v2 with: node-version: '20.11.1' - name: Setup Hexo environment run: | npm install -g hexo-cli npm ci - name: Generate pages run: | hexo generate ls -R public/ - name: Deploy uses: JamesIves/github-pages-deploy-action@releases/v3 with: REPOSITORY_NAME: yohakuo/yohakuo.github.io BRANCH: html FOLDER: public
|
基本操作
1
| git commit -m "main workflow configure"
|
1
| git commit -m "Vault backup"
|
- 暂存更改(将它们暂存起来,然后在合并分支后再恢复)
1
| git push origin --delete
|
1
| git branch -u origin/main
|
主题
我记得当时配置这个主题出现了一点问题,最后是把它作为子模块工作流才能运行成<submodules: true>
解决方案
You have unmerged paths.
- 来到标红的文件进行修改,再次 push
**MERGING**
就没有了
git push -u origin --> fatal: unable to access
- 远程仓库和本地不一致,比如远程有的文件本地没有
- 查询并取消代理
1 2 3
| git config --global http.proxy git config --global --unset http.proxy
|