Skip to content

Commit

Permalink
V2 启动!!!
Browse files Browse the repository at this point in the history
  • Loading branch information
W1ndys committed Jan 23, 2025
1 parent 9d146cc commit 4dc2636
Show file tree
Hide file tree
Showing 85 changed files with 24,969 additions and 0 deletions.
30 changes: 30 additions & 0 deletions .cursorrules
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
你是一个 Python开发方面的专家,在生成commit信息方面,你只会用中文语言,并遵循下面模板,在其他方面保持默认。

---

### 提交信息格式模板:

1. 遵循以下模板:
<类型>(<范围>): <简要描述>

<详细描述>

<备注>

2. 指南:

- 每行字符限制为 72 个字符。
- 必须包含 Header;Body 和 Footer 可选。
- 开头使用动词。
- 提供必要的上下文。
- 使用中文书写。

3. 类型:

- feat:新功能
- fix:修复 Bug
- docs:文档更新
- style:代码格式调整(不涉及逻辑变化)
- refactor:代码重构
- test:新增或修改测试
- chore:构建或工具相关更改
53 changes: 53 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: Deploy Pages

on:
push:
branches: [ main ] # 或者你的默认分支名
workflow_dispatch:

jobs:
deploy:
runs-on: ubuntu-latest
permissions:
contents: write # 添加写入权限
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0 # 获取完整的 git 历史

- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: '18'

- name: Setup pnpm
uses: pnpm/action-setup@v2
with:
version: latest

- name: Install Dependencies
run: |
pnpm config set registry https://registry.npmmirror.com/
pnpm install
- name: Build
run: |
pnpm run docs:build
ls -la # 检查构建输出目录
- name: Deploy
uses: JamesIves/github-pages-deploy-action@v4
with:
folder: src/.vuepress/dist # 修改为正确的构建输出目录
branch: gh-pages
token: ${{ secrets.GITHUB_TOKEN }} # 使用 GitHub 提供的 token
clean: true
force: true

- name: SSH to Server and Run Script
uses: appleboy/[email protected]
with:
host: ${{ secrets.SERVER_HOST }}
username: ${{ secrets.SERVER_USER }}
password: ${{ secrets.SERVER_PASSWORD }}
script: /home/W1ndys/Easy-QFNU_scripts/update_site.sh
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
node_modules
src/.vuepress/.cache
src/.vuepress/.temp
.DS_Store
.vscode
src/.vuepress/dist
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# v2.Easy-QFNU
Easy-QFNU的二代版本,基于vuepress-theme-hope构建,开发完成后会迁移到原仓库
2 changes: 2 additions & 0 deletions build.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
@echo off
pnpm docs:build
1 change: 1 addition & 0 deletions build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
pnpm docs:build
33 changes: 33 additions & 0 deletions install.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
#!/bin/bash

# 设置颜色输出
GREEN='\033[0;32m'
RED='\033[0;31m'
NC='\033[0m' # No Color

echo "开始安装依赖..."

# 检查 pnpm 是否已安装
if ! command -v pnpm &> /dev/null; then
echo -e "${RED}错误: pnpm 未安装${NC}"
echo "正在尝试安装 pnpm..."
# 使用 npm 安装 pnpm
npm install -g pnpm

if [ $? -ne 0 ]; then
echo -e "${RED}pnpm 安装失败,请手动安装 pnpm${NC}"
exit 1
fi
fi

# 执行 pnpm install
echo "执行 pnpm install..."
pnpm install

# 检查安装结果
if [ $? -eq 0 ]; then
echo -e "${GREEN}依赖安装成功!${NC}"
else
echo -e "${RED}依赖安装失败,请检查错误信息${NC}"
exit 1
fi
2 changes: 2 additions & 0 deletions localhost-clean&serve.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
@echo off
pnpm docs:clean-dev
1 change: 1 addition & 0 deletions localhost-clean&serve.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
pnpm docs:clean-dev
2 changes: 2 additions & 0 deletions localhost-serve.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
@echo off
pnpm run docs:dev
1 change: 1 addition & 0 deletions localhost-serve.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
pnpm docs:dev
Loading

0 comments on commit 4dc2636

Please sign in to comment.