-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
8174fb2
commit 55af5f4
Showing
6 changed files
with
69 additions
and
68 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
name: deploy | ||
on: | ||
push: | ||
branches: [main] # main 分支有 push 时触发 | ||
paths-ignore: # 下列文件的变更不触发部署,可以自行添加 | ||
- README.md | ||
jobs: | ||
deploy: | ||
runs-on: ubuntu-latest | ||
steps: | ||
# 下载源码 | ||
# 这一步就是检出你的仓库并下载里面的代码到runner中,actions/checkout@v2是官方自己造的轮子,直接拿来用就行 | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
|
||
# 打包构建 | ||
- name: Build | ||
uses: actions/setup-node@master | ||
with: | ||
node-version: "22.x" | ||
- run: npm install # 安装依赖 | ||
- run: npm run docs:build # 打包 | ||
|
||
# 部署到 GitHub pages | ||
- name: Deploy | ||
uses: peaceiris/actions-gh-pages@v3 # 使用部署到 GitHub pages 的 action | ||
with: | ||
# 部署到 main 分支 | ||
branch: main | ||
# deploy_key: ${{ secrets.ADMINPROCICD }} # 部署密钥,在项目的 Settings/Secrets 中配置 | ||
publish_dir: ./docs/.vitepress/dist # 部署目录 | ||
github_token: ${{ secrets.ADMINPROCICD }} # secret 名 | ||
user_name: ${{ secrets.MY_USER_NAME }} | ||
user_email: ${{ secrets.MY_USER_EMAIL }} | ||
commit_message: 自动部署 # 部署时的 git 提交信息,自由填写 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
.DS_Store | ||
node_modules | ||
/dist | ||
/docs/.vitepress/dist | ||
|
||
# local env files | ||
.env.local | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters