Compare commits

..

No commits in common. "42a3f5e5a7ea59ba998cffa47af6d849455decd8" and "7ce142ffd1b97751441dce274892dde72c02eda0" have entirely different histories.

2 changed files with 0 additions and 78 deletions

View File

@ -1,49 +0,0 @@
name: Deploy to Server
on:
push:
branches: [main]
workflow_dispatch: {}
jobs:
build:
runs-on:
labels: mac-mini-2018
env:
APP_NAME: fucai-admin
BUILD_NAME: fucai-admin-${{ github.run_number }}-${{ github.sha }}
SSH_USER: root
SSH_HOST: 123.60.153.169
steps:
- uses: actions/checkout@v4
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 20
- name: Install deps & Build site
run: |
corepack enable
pnpm install --frozen-lockfile
pnpm build
- name: Archive dist
run: |
tar -czf ${{ env.BUILD_NAME }}.tar.gz -C dist .
- name: Upload to server
run: |
scp ${{ env.BUILD_NAME }}.tar.gz ${{ env.SSH_USER }}@${{ env.SSH_HOST }}:/tmp/
- name: Remote deploy
run: |
ssh ${{ env.SSH_USER }}@${{ env.SSH_HOST }} <<'SH'
set -e
cd /var/www/
rm -rf ${{ env.APP_NAME }}
mkdir -p ${{ env.APP_NAME }}
tar -xzf /tmp/${{ env.BUILD_NAME }}.tar.gz -C ${{ env.APP_NAME }}
rm /tmp/${{ env.BUILD_NAME }}.tar.gz
SH

View File

@ -1,29 +0,0 @@
name: Mirror to smartjingrui's git
on:
push:
branches: [main]
workflow_dispatch: {}
jobs:
build:
runs-on:
labels: mac-mini-2018
steps:
- name: Checkout source repository
uses: actions/checkout@v4
with:
fetch-depth: 0 # 必须 0否则无法完整 mirror
- name: Set up mirror remote (http)
run: |
mirror_url="http://weichengwu:cKk2HUP8@123.60.153.169:3006/fucai/fucai-admin.git"
if git remote get-url mirror >/dev/null 2>&1; then
git remote set-url mirror "$mirror_url"
else
git remote add mirror "$mirror_url"
fi
- name: Push to mirror
run: |
git push --mirror mirror