Skip to content

Commit bb20e21

Browse files
committed
ci: 🎡 自动化
1 parent 72088ae commit bb20e21

File tree

2 files changed

+56
-1
lines changed

2 files changed

+56
-1
lines changed

.github/workflows/deploy.yml

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
# 工作流的名称,如果省略,则使用当前文件名
2+
name: Auto Deploy
3+
4+
# 从工作流生成的工作流运行的名称,如果省略,则使用提交时的commit信息
5+
run-name: Deploy by @${{ github.actor }}
6+
7+
# 触发部署的条件
8+
on:
9+
# 每当 push 到 master 分支时触发部署
10+
push:
11+
branches:
12+
- master
13+
14+
permissions:
15+
contents: read
16+
pages: write
17+
id-token: write
18+
19+
# 当前流程要执行的任务,可以是多个。[my_first_job]就是一个任务
20+
jobs:
21+
build:
22+
name: build-and-deploy
23+
runs-on: ubuntu-latest
24+
25+
steps:
26+
- uses: actions/checkout@v4
27+
- uses: pnpm/action-setup@v2
28+
with:
29+
version: 6.32.9
30+
- uses: actions/setup-node@v4
31+
with:
32+
node-version: '18'
33+
cache: 'pnpm'
34+
35+
- name: install
36+
run: pnpm install
37+
38+
- name: Run Build Script
39+
run: pnpm build
40+
41+
- name: Upload artifact
42+
uses: actions/upload-pages-artifact@v3
43+
with:
44+
path: ./dist
45+
# Deployment job
46+
deploy:
47+
environment:
48+
name: github-pages
49+
url: ${{ steps.deployment.outputs.page_url }}
50+
runs-on: ubuntu-latest
51+
needs: build
52+
steps:
53+
- name: Deploy to GitHub Pages
54+
id: deployment
55+
uses: actions/deploy-pages@v4

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
### 获取项目代码
66

77
```bash
8-
git clone https://github.com/gitboyzcf/vue3-template.git
8+
git clone https://github.com/gitboyzcf/vue3-vite-template.git
99
```
1010

1111
### 安装依赖

0 commit comments

Comments
 (0)