mirror of
https://github.com/woodchen-ink/nezha-dash-v1.git
synced 2025-07-18 17:41:56 +08:00
- Changed the title and branding from "哪吒监控 Nezha Monitoring" to "CZL SVR" in index.html and Header component. - Updated stylesheet links to point to a new CDN. - Modified API proxy settings in vite.config.ts to use a different port (18009). - Removed outdated GitHub Actions workflows for linting and building. - Updated footer links and removed unnecessary version display. - Updated translations in English, Simplified Chinese, and Traditional Chinese locales to reflect new branding. - Deleted unused apple-touch-icon.png from assets. This commit enhances the project's branding and streamlines the configuration.
42 lines
1.0 KiB
YAML
42 lines
1.0 KiB
YAML
name: Deploy to Server
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main # 或者你的主分支名称
|
|
|
|
jobs:
|
|
build-and-deploy:
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Setup Node.js
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version: '22'
|
|
cache: 'npm'
|
|
|
|
- name: Install dependencies
|
|
run: npm install
|
|
|
|
- name: Build project
|
|
run: npm run build
|
|
|
|
- name: Setup SSH
|
|
uses: webfactory/ssh-agent@v0.9.0
|
|
with:
|
|
ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }}
|
|
|
|
- name: Add host key
|
|
run: |
|
|
mkdir -p ~/.ssh
|
|
ssh-keyscan -p ${{ secrets.SSH_PORT || 22 }} ${{ secrets.SSH_HOST }} >> ~/.ssh/known_hosts
|
|
|
|
- name: Deploy to server
|
|
run: |
|
|
rsync -avz --delete -e "ssh -p ${{ secrets.SSH_PORT || 22 }}" \
|
|
dist/ \
|
|
${{ secrets.SSH_USERNAME }}@${{ secrets.SSH_HOST }}:/opt/1panel/apps/openresty/openresty/www/sites/svr/index/ |