feat: initialize Vue application with main components and styles

- Added App.vue as the main application component with a structured layout.
- Created main.js to bootstrap the Vue application and mount it to the DOM.
- Introduced styles.css for global styling, including responsive design and theming.
- Removed outdated HTML files (stats.html, towns.html) and Python script (statsprocess.py) as part of the migration to a new Vue-based architecture.
- Added Vite configuration (vite.config.js) for building the Vue application.
This commit is contained in:
zhangyuheng
2026-03-18 10:07:03 +08:00
parent 3c65860619
commit 124b545ee2
51 changed files with 1671 additions and 14130 deletions

View File

@@ -4,8 +4,7 @@ on:
push:
branches: [main]
schedule:
# Every days at 04:00 UTC
- cron: "0 4 */1 * *"
- cron: "0 4 * * *"
workflow_dispatch:
permissions:
@@ -24,35 +23,37 @@ jobs:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: 20
cache: npm
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.x"
- name: Install frontend dependencies
run: npm ci
- name: Install Python dependencies
run: pip install requests tqdm
- name: Run statsprocess.py
- name: Update player stats
env:
STATS_BASE_URL: ${{ secrets.STATS_BASE_URL }}
STATS_USER: ${{ secrets.STATS_USER }}
STATS_PASS: ${{ secrets.STATS_PASS }}
run: python statsprocess.py
run: python scripts/statsprocess.py
- name: Prepare Pages artifact
run: |
mkdir -p _site
rsync -a --delete \
--exclude '.git/' \
--exclude '.github/' \
--exclude 'README.md' \
--exclude 'statsprocess.py' \
./ ./_site/
- name: Build site
run: npm run build
- name: Upload Pages artifact
uses: actions/upload-pages-artifact@v3
with:
path: ./_site
path: ./dist
deploy:
needs: build
@@ -71,7 +72,6 @@ jobs:
if: success()
steps:
- name: Submit URLs to IndexNow
if: ${{ env.INDEXNOW_KEY != '' }}
env:
INDEXNOW_KEY: ${{ secrets.INDEXNOW_KEY }}
run: |
@@ -79,6 +79,7 @@ jobs:
echo "INDEXNOW_KEY not set, skipping."
exit 0
fi
HOST="bailuyuan.lunadeer.cn"
curl -s -X POST "https://api.indexnow.org/indexnow" \
-H "Content-Type: application/json" \
@@ -87,15 +88,8 @@ jobs:
\"key\": \"${INDEXNOW_KEY}\",
\"keyLocation\": \"https://${HOST}/${INDEXNOW_KEY}.txt\",
\"urlList\": [
\"https://${HOST}/\",
\"https://${HOST}/sponsor.html\",
\"https://${HOST}/stats.html\",
\"https://${HOST}/join.html\",
\"https://${HOST}/facilities.html\",
\"https://${HOST}/doc.html\",
\"https://${HOST}/map.html\",
\"https://${HOST}/photo.html\"
\"https://${HOST}/\"
]
}"
echo ""
echo "IndexNow notification sent."
echo "IndexNow notification sent."