Skip to content

Commit abbad97

Browse files
committed
v2.2.1: frontend closed-source + Docker one-click deploy
- Remove frontend source code (now in private repo) - Add pre-built frontend/dist/ with Nginx serving - Simplify docker-compose.yml (no Node.js build needed) - Update README with docs index and Docker deploy guide - Add admin order list and AI analysis stats tabs - Add quick trade API routes - Clean up redundant files (package-lock.json, yarn.lock, .iml) - Add GitHub Actions workflow for frontend update automation
1 parent ffdd2ff commit abbad97

File tree

250 files changed

+1895
-91621
lines changed

Some content is hidden

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

250 files changed

+1895
-91621
lines changed
Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
# ======================================================
2+
# Workflow: Update Frontend Build
3+
# ======================================================
4+
# This workflow is triggered manually (or via repository_dispatch)
5+
# from your PRIVATE frontend repo after a new build.
6+
#
7+
# Setup:
8+
# 1. In your PRIVATE frontend repo, create a GitHub Action that:
9+
# - Builds the Vue.js project
10+
# - Uses repository_dispatch to trigger this workflow
11+
# - Or: upload the dist as an artifact and trigger this workflow
12+
#
13+
# 2. Create a GitHub Personal Access Token (PAT) with repo access
14+
# and store it as a secret: FRONTEND_DEPLOY_TOKEN
15+
#
16+
# Alternative: Run manually from the Actions tab.
17+
# ======================================================
18+
19+
name: Update Frontend Build
20+
21+
on:
22+
# Manual trigger from GitHub UI
23+
workflow_dispatch:
24+
inputs:
25+
version:
26+
description: 'Frontend version (e.g. 1.2.0)'
27+
required: false
28+
default: 'latest'
29+
30+
# Triggered by private repo via repository_dispatch
31+
repository_dispatch:
32+
types: [frontend-updated]
33+
34+
jobs:
35+
update-frontend:
36+
runs-on: ubuntu-latest
37+
38+
steps:
39+
- name: Checkout open-source repo
40+
uses: actions/checkout@v4
41+
with:
42+
token: ${{ secrets.FRONTEND_DEPLOY_TOKEN || secrets.GITHUB_TOKEN }}
43+
44+
- name: Download frontend build artifact
45+
# Option A: Download from private repo's latest release
46+
# Replace OWNER/PRIVATE_REPO with your private frontend repo
47+
env:
48+
GH_TOKEN: ${{ secrets.FRONTEND_DEPLOY_TOKEN }}
49+
run: |
50+
echo "Downloading frontend build..."
51+
# Option A: From GitHub Release
52+
# gh release download latest -R OWNER/quantdinger-frontend -p 'dist.tar.gz' -D /tmp
53+
# tar -xzf /tmp/dist.tar.gz -C frontend/dist/
54+
55+
# Option B: From repository_dispatch payload
56+
if [ "${{ github.event.client_payload.artifact_url }}" != "" ]; then
57+
curl -L -H "Authorization: token $GH_TOKEN" \
58+
"${{ github.event.client_payload.artifact_url }}" \
59+
-o /tmp/dist.tar.gz
60+
rm -rf frontend/dist/*
61+
tar -xzf /tmp/dist.tar.gz -C frontend/dist/
62+
else
63+
echo "No artifact URL provided. Please use manual upload or release download."
64+
echo "Skipping download step - assuming dist/ is already updated."
65+
fi
66+
67+
- name: Update VERSION
68+
run: |
69+
VERSION="${{ github.event.inputs.version || github.event.client_payload.version || 'latest' }}"
70+
echo "$VERSION" > frontend/VERSION
71+
echo "Frontend version: $VERSION"
72+
73+
- name: Commit and push
74+
run: |
75+
git config user.name "github-actions[bot]"
76+
git config user.email "github-actions[bot]@users.noreply.github.com"
77+
git add frontend/dist/ frontend/VERSION
78+
if git diff --staged --quiet; then
79+
echo "No changes to commit"
80+
else
81+
VERSION=$(cat frontend/VERSION)
82+
git commit -m "chore: update frontend build v${VERSION}"
83+
git push
84+
fi

0 commit comments

Comments
 (0)