Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
67 changes: 67 additions & 0 deletions .github/workflows/deploy-web.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
name: Deploy Web App to GitHub Pages

on:
push:
branches:
- main
- copilot/implement-github-login-feature
paths:
- 'web/**'
- '.github/workflows/deploy-web.yml'
workflow_dispatch:

permissions:
contents: read
pages: write
id-token: write

concurrency:
group: "pages"
cancel-in-progress: false

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'npm'
cache-dependency-path: 'web/package-lock.json'

- name: Install dependencies
run: |
cd web
npm ci

- name: Build
run: |
cd web
npm run build

- name: Copy plugins.json to dist
run: |
cp plugins.json web/dist/

- name: Setup Pages
uses: actions/configure-pages@v4

- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: './web/dist'

deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: build
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
19 changes: 17 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

- [插件列表](#插件列表)
- [提交插件](#提交插件)
- [在线提交工具](#在线提交工具)
- [插件规范](#插件规范)

## 插件列表
Expand All @@ -14,13 +15,27 @@

## 提交插件

### 前置条件
### 在线提交工具

我们提供了一个在线工具来简化插件提交流程:

🔗 **[插件提交页面](https://karinjs.github.io/plugins-list/)** (开发中)

该工具提供以下功能:
- 使用 GitHub 登录
- 自动检测已提交的插件
- 验证 npm 包存在性
- 简化的提交流程

### 手动提交

#### 前置条件

1. 确保你的插件符合规范要求
2. 确保你的插件遵循 [插件规范](#插件规范)
3. 准备好插件的相关信息

### 提交步骤
#### 提交步骤

1. Fork 本仓库
2. 在 `plugins.json` 文件中添加你的插件信息
Expand Down
5 changes: 5 additions & 0 deletions web/.env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# GitHub OAuth App Configuration
# Create a GitHub OAuth App at: https://github.com/settings/developers
# Set Authorization callback URL to: http://localhost:5173/plugins-list/ (for dev) or https://karinjs.github.io/plugins-list/ (for production)

VITE_GITHUB_CLIENT_ID=your_github_oauth_client_id_here
25 changes: 25 additions & 0 deletions web/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
lerna-debug.log*

node_modules
dist
dist-ssr
*.local
.env

# Editor directories and files
.vscode/*
!.vscode/extensions.json
.idea
.DS_Store
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?
Loading