chore: merge from 'master'
Some checks failed
deploy to server / build-and-deploy (push) Has been cancelled
Some checks failed
deploy to server / build-and-deploy (push) Has been cancelled
This commit is contained in:
58
.gitea/workflows/deploy.yml
Normal file
58
.gitea/workflows/deploy.yml
Normal file
@ -0,0 +1,58 @@
|
|||||||
|
name: deploy to server
|
||||||
|
|
||||||
|
on: push
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build-and-deploy:
|
||||||
|
runs-on: node22-build
|
||||||
|
steps:
|
||||||
|
- name: Check Proxy
|
||||||
|
run: |
|
||||||
|
echo "HTTP_PROXY = $HTTP_PROXY"
|
||||||
|
echo "HTTPS_PROXY = $HTTPS_PROXY"
|
||||||
|
# 测试网络是否能透过代理访问一个外部 URL,比如 google.com
|
||||||
|
# 也可以换成你常用的 npm registry / GitHub
|
||||||
|
curl -I https://www.google.com --max-time 10 || echo "curl to google failed"
|
||||||
|
# 测试拉取 npm 包或 ping github.com
|
||||||
|
curl -I https://registry.npmjs.org --max-time 10 || echo "curl to registry.npmjs.org failed"
|
||||||
|
ping -c 3 github.com || echo "ping github.com failed"
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v5
|
||||||
|
- name: Setup pnpm
|
||||||
|
uses: pnpm/action-setup@v4
|
||||||
|
with:
|
||||||
|
version: 10
|
||||||
|
- name: Setup node 22
|
||||||
|
uses: actions/setup-node@v5
|
||||||
|
with:
|
||||||
|
node-version: '22'
|
||||||
|
cache: 'pnpm'
|
||||||
|
- name: Cache pnpm store
|
||||||
|
uses: actions/cache@v4
|
||||||
|
with:
|
||||||
|
path: ~/.pnpm-store
|
||||||
|
key: ${{ runner.os }}-pnpm-${{ hashFiles('pnpm-lock.yaml') }}
|
||||||
|
restore-keys: |
|
||||||
|
${{ runner.os }}-pnpm-
|
||||||
|
- name: Install dependencies
|
||||||
|
run: pnpm install
|
||||||
|
- name: Cache Nuxt build
|
||||||
|
uses: actions/cache@v4
|
||||||
|
with:
|
||||||
|
path: .nuxt
|
||||||
|
key: ${{ runner.os }}-nuxt-${{ hashFiles('pnpm-lock.yaml') }}
|
||||||
|
restore-keys: |
|
||||||
|
${{ runner.os }}-nuxt-
|
||||||
|
- name: Build project
|
||||||
|
run: pnpm run build
|
||||||
|
- name: Deploy to server
|
||||||
|
if: github.ref == 'refs/heads/master'
|
||||||
|
uses: easingthemes/ssh-deploy@main
|
||||||
|
with:
|
||||||
|
ARGS: "-rlgoDzvc -i --delete"
|
||||||
|
REMOTE_HOST: ${{ secrets.rsync_host }}
|
||||||
|
REMOTE_USER: ${{ secrets.rsync_username }}
|
||||||
|
SOURCE: ${{ secrets.rsync_source }}
|
||||||
|
TARGET: ${{ secrets.rsync_destination }}
|
||||||
|
SSH_PRIVATE_KEY: ${{ secrets.rsync_key }}
|
||||||
|
SCRIPT_AFTER: ${{ secrets.script_after_rsync }}
|
||||||
@ -293,6 +293,7 @@
|
|||||||
.recommend-card:hover {
|
.recommend-card:hover {
|
||||||
transform: translateY(-4px);
|
transform: translateY(-4px);
|
||||||
box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
|
box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
|
||||||
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
|
|
||||||
.recommend-card-body {
|
.recommend-card-body {
|
||||||
|
|||||||
@ -29,6 +29,15 @@ export default defineNuxtConfig({
|
|||||||
: process.env.MEILI_SEARCH_INDEXES
|
: process.env.MEILI_SEARCH_INDEXES
|
||||||
: ['production', 'solution'],
|
: ['production', 'solution'],
|
||||||
},
|
},
|
||||||
|
strapi: {
|
||||||
|
url: process.env.STRAPI_URL || 'http://localhost:1337',
|
||||||
|
token: process.env.STRAPI_TOKEN || undefined,
|
||||||
|
prefix: '/api',
|
||||||
|
admin: '/admin',
|
||||||
|
version: 'v5',
|
||||||
|
cookie: {},
|
||||||
|
cookieName: 'strapi_jwt',
|
||||||
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -60,11 +69,11 @@ export default defineNuxtConfig({
|
|||||||
target: 'esnext',
|
target: 'esnext',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
prerender: {
|
// prerender: {
|
||||||
crawlLinks: false,
|
// crawlLinks: false,
|
||||||
routes: ['/'],
|
// routes: ['/'],
|
||||||
ignore: ['/hi'],
|
// ignore: ['/hi'],
|
||||||
},
|
// },
|
||||||
},
|
},
|
||||||
|
|
||||||
vite: {
|
vite: {
|
||||||
@ -104,16 +113,6 @@ export default defineNuxtConfig({
|
|||||||
langDir: 'locales',
|
langDir: 'locales',
|
||||||
},
|
},
|
||||||
|
|
||||||
strapi: {
|
|
||||||
url: process.env.STRAPI_URL || 'http://localhost:1337',
|
|
||||||
token: process.env.STRAPI_TOKEN || undefined,
|
|
||||||
prefix: '/api',
|
|
||||||
admin: '/admin',
|
|
||||||
version: 'v5',
|
|
||||||
cookie: {},
|
|
||||||
cookieName: 'strapi_jwt',
|
|
||||||
},
|
|
||||||
|
|
||||||
imports: {
|
imports: {
|
||||||
dirs: ['types/**'],
|
dirs: ['types/**'],
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user