-
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
befed91
commit 332fb80
Showing
3 changed files
with
32 additions
and
5 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
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,30 @@ | ||
name: CI Github Pages | ||
on: | ||
# 监听push操作 | ||
push: | ||
branches: | ||
- master # 这里只配置了main分支,所以只有推送main分支才会触发以下任务 | ||
workflow_dispatch: | ||
jobs: | ||
# 任务ID | ||
build-and-deploy: | ||
# 运行环境 | ||
runs-on: ubuntu-latest | ||
# 步骤 | ||
steps: | ||
# 官方action,将代码拉取到虚拟机 | ||
- name: Checkout ️ | ||
uses: actions/checkout@v3 | ||
|
||
- name: Install and Build # 安装依赖、打包,如果提前已打包好无需这一步 | ||
run: | | ||
npm install | ||
npm run build | ||
- name: Deploy # 部署 | ||
uses: JamesIves/github-pages-deploy-action@v4.3.3 | ||
with: | ||
branch: gh-pages # 部署后提交到那个分支 | ||
folder: dist # 这里填打包好的目录名称 | ||
token: ${{ secrets.DEPLOY }} | ||
repository-name: 17359898647/17359898647.github.io # 你的github pages仓库地址 |
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