Compare commits
5 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 71d768bd9e | |||
| 3b7c8bbcb2 | |||
| ccfd5be59f | |||
| 96aa507f77 | |||
| 95f614a51e |
+35
-37
@@ -13,7 +13,7 @@ on:
|
|||||||
- cicd
|
- cicd
|
||||||
|
|
||||||
env:
|
env:
|
||||||
DOMAIN_URL: git.kxsw.us #*修改为你12
|
DOMAIN_URL: git.kxsw.us
|
||||||
REPO: ${{ vars.REPO }}
|
REPO: ${{ vars.REPO }}
|
||||||
TELEGRAM_BOT_TOKEN: 8114337882:AAHkEx03HSu7RxN4IHBJJEnsK9aPPzNLIk0
|
TELEGRAM_BOT_TOKEN: 8114337882:AAHkEx03HSu7RxN4IHBJJEnsK9aPPzNLIk0
|
||||||
TELEGRAM_CHAT_ID: "-4940243803"
|
TELEGRAM_CHAT_ID: "-4940243803"
|
||||||
@@ -213,9 +213,9 @@ jobs:
|
|||||||
continue-on-error: true
|
continue-on-error: true
|
||||||
with:
|
with:
|
||||||
path: .turbo
|
path: .turbo
|
||||||
key: turbo-${{ runner.os }}-${{ hashFiles('turbo.json') }}-${{ hashFiles('apps/**/package.json') }}-${{ hashFiles('packages/**/package.json') }}-${{ hashFiles('bun.lock') }}
|
key: turbo-${{ runner.os }}-${{ hashFiles('turbo.json') }}-${{ hashFiles('apps//package.json') }}-${{ hashFiles('packages//package.json') }}-${{ hashFiles('bun.lock') }}
|
||||||
restore-keys: |
|
restore-keys: |
|
||||||
turbo-${{ runner.os }}-${{ hashFiles('turbo.json') }}-${{ hashFiles('apps/**/package.json') }}-${{ hashFiles('packages/**/package.json') }}-
|
turbo-${{ runner.os }}-${{ hashFiles('turbo.json') }}-${{ hashFiles('apps//package.json') }}-${{ hashFiles('packages//package.json') }}-
|
||||||
turbo-${{ runner.os }}-${{ hashFiles('turbo.json') }}-
|
turbo-${{ runner.os }}-${{ hashFiles('turbo.json') }}-
|
||||||
turbo-${{ runner.os }}-
|
turbo-${{ runner.os }}-
|
||||||
|
|
||||||
@@ -313,9 +313,9 @@ jobs:
|
|||||||
path: |
|
path: |
|
||||||
apps/admin/.next/cache
|
apps/admin/.next/cache
|
||||||
apps/user/.next/cache
|
apps/user/.next/cache
|
||||||
key: nextcache-${{ runner.os }}-${{ hashFiles('apps/**/package.json') }}-${{ hashFiles('packages/**/package.json') }}-${{ hashFiles('turbo.json') }}-${{ hashFiles('bun.lock') }}
|
key: nextcache-${{ runner.os }}-${{ hashFiles('apps//package.json') }}-${{ hashFiles('packages//package.json') }}-${{ hashFiles('turbo.json') }}-${{ hashFiles('bun.lock') }}
|
||||||
restore-keys: |
|
restore-keys: |
|
||||||
nextcache-${{ runner.os }}-${{ hashFiles('apps/**/package.json') }}-${{ hashFiles('packages/**/package.json') }}-
|
nextcache-${{ runner.os }}-${{ hashFiles('apps//package.json') }}-${{ hashFiles('packages//package.json') }}-
|
||||||
nextcache-${{ runner.os }}-
|
nextcache-${{ runner.os }}-
|
||||||
|
|
||||||
- name: Cache build outputs
|
- name: Cache build outputs
|
||||||
@@ -328,9 +328,9 @@ jobs:
|
|||||||
apps/user/.next
|
apps/user/.next
|
||||||
apps/admin/dist
|
apps/admin/dist
|
||||||
apps/user/dist
|
apps/user/dist
|
||||||
key: build-${{ runner.os }}-${{ hashFiles('apps/**/*.ts', 'apps/**/*.tsx', 'apps/**/*.js', 'apps/**/*.jsx') }}-${{ hashFiles('packages/**/*.ts', 'packages/**/*.tsx') }}-${{ hashFiles('bun.lock') }}
|
key: build-${{ runner.os }}-${{ hashFiles('apps//*.ts', 'apps//*.tsx', 'apps//*.js', 'apps//*.jsx') }}-${{ hashFiles('packages//*.ts', 'packages//*.tsx') }}-${{ hashFiles('bun.lock') }}
|
||||||
restore-keys: |
|
restore-keys: |
|
||||||
build-${{ runner.os }}-${{ hashFiles('apps/**/*.ts', 'apps/**/*.tsx', 'apps/**/*.js', 'apps/**/*.jsx') }}-
|
build-${{ runner.os }}-${{ hashFiles('apps//*.ts', 'apps//*.tsx', 'apps//*.js', 'apps//*.jsx') }}-
|
||||||
build-${{ runner.os }}-
|
build-${{ runner.os }}-
|
||||||
|
|
||||||
- name: Cache ESLint
|
- name: Cache ESLint
|
||||||
@@ -342,7 +342,7 @@ jobs:
|
|||||||
.eslintcache
|
.eslintcache
|
||||||
apps/admin/.eslintcache
|
apps/admin/.eslintcache
|
||||||
apps/user/.eslintcache
|
apps/user/.eslintcache
|
||||||
key: eslint-${{ runner.os }}-${{ hashFiles('.eslintrc*', 'apps/**/.eslintrc*', 'packages/**/.eslintrc*') }}-${{ hashFiles('bun.lock') }}
|
key: eslint-${{ runner.os }}-${{ hashFiles('.eslintrc*', 'apps//.eslintrc*', 'packages//.eslintrc*') }}-${{ hashFiles('bun.lock') }}
|
||||||
restore-keys: |
|
restore-keys: |
|
||||||
eslint-${{ runner.os }}-
|
eslint-${{ runner.os }}-
|
||||||
|
|
||||||
@@ -355,8 +355,8 @@ jobs:
|
|||||||
.tsbuildinfo
|
.tsbuildinfo
|
||||||
apps/admin/.tsbuildinfo
|
apps/admin/.tsbuildinfo
|
||||||
apps/user/.tsbuildinfo
|
apps/user/.tsbuildinfo
|
||||||
packages/**/.tsbuildinfo
|
packages//.tsbuildinfo
|
||||||
key: typescript-${{ runner.os }}-${{ hashFiles('tsconfig*.json', 'apps/**/tsconfig*.json', 'packages/**/tsconfig*.json') }}-${{ hashFiles('bun.lock') }}
|
key: typescript-${{ runner.os }}-${{ hashFiles('tsconfig*.json', 'apps//tsconfig*.json', 'packages//tsconfig*.json') }}-${{ hashFiles('bun.lock') }}
|
||||||
restore-keys: |
|
restore-keys: |
|
||||||
typescript-${{ runner.os }}-
|
typescript-${{ runner.os }}-
|
||||||
|
|
||||||
@@ -724,42 +724,40 @@ jobs:
|
|||||||
# 步骤5: TG通知 (成功)
|
# 步骤5: TG通知 (成功)
|
||||||
- name: 📱 发送成功通知到Telegram
|
- name: 📱 发送成功通知到Telegram
|
||||||
if: success()
|
if: success()
|
||||||
uses: chapvic/telegram-notify@master
|
uses: appleboy/telegram-action@master
|
||||||
with:
|
with:
|
||||||
bot_token: ${{ env.TELEGRAM_BOT_TOKEN }}
|
token: ${{ env.TELEGRAM_BOT_TOKEN }}
|
||||||
chat_id: ${{ env.TELEGRAM_CHAT_ID }}
|
to: ${{ env.TELEGRAM_CHAT_ID }}
|
||||||
message: |
|
message: |
|
||||||
✅ **部署成功!**
|
✅ 部署成功!
|
||||||
|
|
||||||
📦 **项目**: ${{ github.repository }}
|
📦 项目: ${{ github.repository }}
|
||||||
🌿 **分支**: ${{ github.ref_name }}
|
🌿 分支: ${{ github.ref_name }}
|
||||||
🔖 **版本**: ${{ env.VERSION }}
|
🔖 版本: ${{ env.VERSION }}
|
||||||
🎯 **构建目标**: ${{ env.BUILD_TARGET }}
|
🎯 构建目标: ${{ env.BUILD_TARGET }}
|
||||||
🔗 **API地址**: ${{ env.NEXT_PUBLIC_API_URL }}
|
🔗 API地址: ${{ env.NEXT_PUBLIC_API_URL }}
|
||||||
📝 **提交**: ${{ github.sha }}
|
📝 提交: ${{ github.sha }}
|
||||||
👤 **提交者**: ${{ github.actor }}
|
👤 提交者: ${{ github.actor }}
|
||||||
🕐 **时间**: ${{ github.event.head_commit.timestamp }}
|
🕐 时间: ${{ github.event.head_commit.timestamp }}
|
||||||
|
|
||||||
🚀 **服务已成功部署到生产环境**
|
🚀 服务已成功部署到生产环境
|
||||||
parse_mode: Markdown
|
|
||||||
|
|
||||||
# 步骤5: TG通知 (失败)
|
# 步骤5: TG通知 (失败)
|
||||||
- name: 📱 发送失败通知到Telegram
|
- name: 📱 发送失败通知到Telegram
|
||||||
if: failure()
|
if: failure()
|
||||||
uses: chapvic/telegram-notify@master
|
uses: appleboy/telegram-action@master
|
||||||
with:
|
with:
|
||||||
bot_token: ${{ env.TELEGRAM_BOT_TOKEN }}
|
token: ${{ env.TELEGRAM_BOT_TOKEN }}
|
||||||
chat_id: ${{ env.TELEGRAM_CHAT_ID }}
|
to: ${{ env.TELEGRAM_CHAT_ID }}
|
||||||
message: |
|
message: |
|
||||||
❌ **部署失败!**
|
❌ 部署失败!
|
||||||
|
|
||||||
📦 **项目**: ${{ github.repository }}
|
📦 项目: ${{ github.repository }}
|
||||||
🌿 **分支**: ${{ github.ref_name }}
|
🌿 分支: ${{ github.ref_name }}
|
||||||
🔖 **版本**: ${{ env.VERSION }}
|
🔖 版本: ${{ env.VERSION }}
|
||||||
🎯 **构建目标**: ${{ env.BUILD_TARGET }}
|
🎯 构建目标: ${{ env.BUILD_TARGET }}
|
||||||
📝 **提交**: ${{ github.sha }}
|
📝 提交: ${{ github.sha }}
|
||||||
👤 **提交者**: ${{ github.actor }}
|
👤 提交者: ${{ github.actor }}
|
||||||
🕐 **时间**: ${{ github.event.head_commit.timestamp }}
|
🕐 时间: ${{ github.event.head_commit.timestamp }}
|
||||||
|
|
||||||
⚠️ **请检查构建日志获取详细信息**
|
⚠️ 请检查构建日志获取详细信息
|
||||||
parse_mode: Markdown
|
|
||||||
|
|||||||
Reference in New Issue
Block a user