cd ./{projectName}
yarn
yarn dev
新建github仓库,并将本项目和仓库进行关联
.github/workflows/deploy.yml
放置github action文件,当我们push项目到远程之后会自动触发acion。- **需特别注意配置中我们监听的分支,如果你的主分支为main,请更改为main
on:
push:
branches:
- master
注意gh-pages分支只有在构建完一次action之后才会存在
如遇到问题
GitHub Action: The process ‘/usr/bin/git‘ failed with exit code 128
解决方式
参考文档:
docs/.vitepress/config.js
文件的内容请参照vitepress自行配置
vitepress https://process1024.github.io/vitepress/guide/theme-search https://juejin.cn/post/7164276166084263972