Skip to content

Commit 7366bd0

Browse files
committed
chore: add github actions
1 parent a07504d commit 7366bd0

File tree

97 files changed

+92
-1891
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

97 files changed

+92
-1891
lines changed

.github/workflows/deploy.yml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: deploy to GitHub Pages
2+
3+
on:
4+
push:
5+
branches: [ main, master ]
6+
workflow_dispatch:
7+
8+
permissions:
9+
contents: read
10+
pages: write
11+
id-token: write
12+
13+
concurrency:
14+
group: "pages"
15+
cancel-in-progress: true
16+
17+
jobs:
18+
build-and-deploy:
19+
runs-on: ubuntu-latest
20+
steps:
21+
- name: checkout
22+
uses: actions/checkout@v3
23+
24+
- name: setup-node
25+
uses: actions/setup-node@v3
26+
with:
27+
node-version: '18'
28+
cache: 'npm'
29+
30+
- name: install-dependencies
31+
run: npm ci
32+
33+
- name: build-project
34+
run: npm run build
35+
36+
- name: deploy-to-github-pages
37+
uses: JamesIves/github-pages-deploy-action@v4
38+
with:
39+
folder: dist
40+
branch: gh-pages
41+
clean: true

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ pnpm-debug.log*
88
lerna-debug.log*
99

1010
node_modules
11-
# dist
11+
dist
1212
dist-ssr
1313
*.local
1414

README.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,19 @@ npm run dev
4848
npm run build
4949
```
5050

51+
## 自动部署
52+
本项目使用 GitHub Actions 实现自动构建和部署。每当代码推送到 main 或 master 分支时,GitHub Actions 会自动执行以下操作:
53+
54+
1. 检出代码
55+
2. 设置 Node.js 环境
56+
3. 安装依赖
57+
4. 构建项目
58+
5. 将构建结果部署到 gh-pages 分支
59+
60+
这样,您只需要关注代码开发,无需手动部署。项目会自动部署到 GitHub Pages 上,访问地址为:https://stepfenshawn.github.io/ShitCodify/
61+
62+
如果您想手动触发部署,可以在 GitHub 仓库的 Actions 标签页中手动运行工作流。
63+
5164
## 贡献 Prompts
5265
所有语言的 prompts 模板在 [这个](src/prompt/) 目录下.
5366
欢迎贡献代码、报告问题或提出建议!

dist/assets/abap-ad6e811d.js

Lines changed: 0 additions & 6 deletions
This file was deleted.

dist/assets/apex-992ba105.js

Lines changed: 0 additions & 6 deletions
This file was deleted.

0 commit comments

Comments
 (0)