diff --git a/.github/workflows/deploy-xcontrol-panel.yml b/.github/workflows/deploy-xcontrol-panel.yml new file mode 100644 index 0000000..7198de4 --- /dev/null +++ b/.github/workflows/deploy-xcontrol-panel.yml @@ -0,0 +1,57 @@ +name: Deploy Xcontrol-panel to Cloudflare Pages + +on: + pull_request: + paths: + - 'ui/nextjs/**' + - '.github/workflows/deploy-xcontrol-panel.yml' + workflow_dispatch: + paths: + - 'ui/nextjs/**' + - '.github/workflows/deploy-xcontrol-panel.yml' + branches: [main] + +jobs: + deploy: + runs-on: ubuntu-latest + defaults: + run: + working-directory: ui/nextjs + + steps: + - name: 📦 Checkout source code + uses: actions/checkout@v4 + + - name: 🧰 Setup Node.js + uses: actions/setup-node@v4 + with: + node-version: '20.x' + + - name: 📥 Install dependencies + run: yarn install --frozen-lockfile + + - name: 🛠️ Build static site + run: yarn build # next build (output: 'export' 会自动产出 ./out) + + - name: 🚀 Deploy to Cloudflare Pages + uses: cloudflare/pages-action@v1 + with: + apiToken: ${{ secrets.CF_API_TOKEN }} + accountId: ${{ secrets.CF_ACCOUNT_ID }} + projectName: xcontrol-panel # 和 Pages 控制台里看到的项目名保持一致 + directory: ui/nextjs/out # 指定到子目录 out + wranglerVersion: '4' # 升级到 Wrangler v4,避免 v2 大量警告 + +# - name: 📤 Deploy to VPS via rsync +# env: +# RSYNC_SSH_KEY: ${{ secrets.SSH_PRIVATE_KEY }} +# VPS_HOST: ${{ secrets.VPS_HOST }} +# run: | +# mkdir -p ~/.ssh +# echo "$RSYNC_SSH_KEY" > ~/.ssh/id_rsa +# chmod 600 ~/.ssh/id_rsa +# ssh-keyscan -H "$VPS_HOST" >> ~/.ssh/known_hosts +# rsync -av out/ root@"$VPS_HOST":/mnt/data/website/ --delete + + - name: ✅ Confirm deployment complete + run: echo "✅ Homepage deployed to Cloudflare & VPS Site." diff --git a/ui/homepage/app/page.tsx b/ui/homepage/app/page.tsx index b969f22..0f60fad 100644 --- a/ui/homepage/app/page.tsx +++ b/ui/homepage/app/page.tsx @@ -2,6 +2,8 @@ import Hero from '@components/Hero' import Features from '@components/Features' import OpenSource from '@components/OpenSource' import DownloadSection from '@components/DownloadSection' +import Terms from '@components/Terms' +import Contact from '@components/Contact' import Footer from '@components/Footer' import NavBar from '@components/NavBar' @@ -14,6 +16,8 @@ export default function Page() { + +