Skip to content
Closed
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
83 changes: 0 additions & 83 deletions .github/CODE_OF_CONDUCT.md

This file was deleted.

86 changes: 0 additions & 86 deletions .github/SECURITY.md

This file was deleted.

62 changes: 62 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
name: CI Pipeline # 工作流名称

# 触发条件:当推送到main分支时触发 [citation:5]
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]

env:
USERNAME: deployer

# 定义要执行的任务
jobs:
build:
runs-on: ubuntu-latest # 使用最新的Ubuntu环境
defaults:
run:
working-directory: ./web

# 定义步骤
steps:
- name: 检出代码
uses: actions/checkout@v4 # 将你的代码拉取到CI环境中

- name: 设置Node.js 24环境
uses: actions/setup-node@v4
with:
node-version: '24'

- name: 安装依赖
run: |
if [ -f package-lock.json ]; then
npm ci --legacy-peer-deps
else
npm install --legacy-peer-deps
fi

- name: 构建项目
run: npm run build # 执行构建,生成dist文件夹
env:
# 如果有环境变量,在这里设置
VITE_API_BASE_URL: https://api.meeyo.org

- name: 上传构建产物
uses: actions/upload-artifact@v4
with:
name: dist
path: web/dist/ # 上传dist文件夹,可供后续部署使用

- name: 部署到服务器
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
uses: appleboy/scp-action@v0.1.7
with:
host: ${{ secrets.SSH_IP }}
port: 22
username: ${{ env.USERNAME }}
key: ${{ secrets.SSH_KEY }}
source: web/dist/*
target: /opt/www/meeyo
strip_components: 2
overwrite: true
151 changes: 0 additions & 151 deletions .github/workflows/docker-image-alpha.yml

This file was deleted.

Loading