-
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
Showing
2 changed files
with
24 additions
and
96 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# 以下以一个构建vue项目的yml文件为例子 | ||
name: Deploy | ||
|
||
on: | ||
push: | ||
branches: | ||
- main # 这里只配置了main分支,所以只有推送main分支才会触发以下任务 | ||
jobs: | ||
build-and-deploy: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Use Node.js | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 14.x | ||
- run: node -v | ||
- run: npm install | ||
- run: npm run build | ||
- name: Deploy # 部署 | ||
uses: JamesIves/[email protected] | ||
with: | ||
branch: gh-pages # 部署后提交到那个分支 | ||
folder: dist # 这里填打包好的目录名称 |