Skip to content

Commit cdf0ded

Browse files
authored
feat(SEO): add more explicit robots guide (#180)
2 parents b97e661 + edbade9 commit cdf0ded

File tree

5 files changed

+1511
-1479
lines changed

5 files changed

+1511
-1479
lines changed
Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
name: 🚀 Deploy Blog to Server (Build & Upload)
2+
3+
on:
4+
push:
5+
branches:
6+
- blog
7+
workflow_dispatch:
8+
inputs:
9+
ref:
10+
description: Branch to deploy
11+
required: false
12+
default: blog
13+
14+
permissions:
15+
contents: read
16+
17+
jobs:
18+
test:
19+
runs-on: ubuntu-latest
20+
21+
steps:
22+
# Step 1: Checkout code
23+
- name: 📂 Checkout code
24+
uses: actions/checkout@v4
25+
with:
26+
ref: ${{ github.event.inputs.ref || github.ref_name }}
27+
fetch-depth: 1
28+
29+
# Step 2: Set up Node.js and pnpm
30+
- name: 📦 Set up Node.js and pnpm
31+
uses: pnpm/action-setup@v4
32+
with:
33+
run_install: |
34+
- recursive: true
35+
args: [--frozen-lockfile]
36+
37+
# Step 3: Run linter
38+
- name: 🚨 Lint Code
39+
run: pnpm run lint
40+
41+
# Step 4: Test wether build is successful
42+
- name: ✅ Build Project
43+
run: pnpm run build
44+
45+
# Step 5: Pack build artifacts
46+
- name: 📦 Package build files
47+
run: |
48+
tar -czf build.tar.gz \
49+
.next \
50+
public \
51+
package.json \
52+
pnpm-lock.yaml \
53+
.node-version \
54+
LICENSE
55+
56+
# Step 6: Upload packaged build to server
57+
- name: 📤 Upload build to server
58+
uses: appleboy/[email protected]
59+
with:
60+
host: ${{ secrets.SSH_HOST }}
61+
username: ${{ secrets.SSH_USER }}
62+
key: ${{ secrets.SSH_KEY }}
63+
source: build.tar.gz
64+
target: /data/apps/SuzuBlog/app
65+
66+
# Step 7: SSH into server and run deploy script
67+
- name: 🛠️ SSH Run deploy.sh
68+
uses: appleboy/[email protected]
69+
with:
70+
host: ${{ secrets.SSH_HOST }}
71+
username: ${{ secrets.SSH_USER }}
72+
key: ${{ secrets.SSH_KEY }}
73+
script: |
74+
cd /data/apps/SuzuBlog/app
75+
./deploy.sh

next.config.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,10 @@ const nextConfig: NextConfig = {
2929
key: 'X-Theme-URL',
3030
value: 'https://suzu.zla.app',
3131
},
32+
{
33+
key: 'X-Robots-Tag',
34+
value: 'all',
35+
},
3236
],
3337
},
3438
]

package.json

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "suzu-blog",
33
"version": "1.9.3",
44
"private": true,
5-
"packageManager": "[email protected].0",
5+
"packageManager": "[email protected].1",
66
"author": {
77
"name": "ZL Asica",
88
"email": "[email protected]",
@@ -28,13 +28,13 @@
2828
"dependencies": {
2929
"@vercel/analytics": "^1.5.0",
3030
"@vercel/speed-insights": "^1.2.0",
31-
"@zl-asica/react": "^0.7.3",
31+
"@zl-asica/react": "^0.7.4",
3232
"clsx": "^2.1.1",
3333
"gray-matter": "^4.0.3",
3434
"katex": "^0.16.22",
35-
"lucide-react": "^0.511.0",
35+
"lucide-react": "^0.513.0",
3636
"minisearch": "^7.1.2",
37-
"next": "15.3.2",
37+
"next": "15.3.3",
3838
"react": "19.1.0",
3939
"react-dom": "19.1.0",
4040
"react-icons": "^5.5.0",
@@ -47,31 +47,31 @@
4747
"remark-math": "^6.0.0",
4848
"twikoo": "^1.6.44",
4949
"yaml": "^2.8.0",
50-
"zod": "^3.25.28"
50+
"zod": "^3.25.51"
5151
},
5252
"devDependencies": {
53-
"@antfu/eslint-config": "^4.13.2",
53+
"@antfu/eslint-config": "^4.13.3",
5454
"@changesets/cli": "^2.29.4",
55-
"@eslint-react/eslint-plugin": "^1.49.0",
56-
"@next/eslint-plugin-next": "^15.3.2",
57-
"@tailwindcss/postcss": "^4.1.7",
58-
"@types/node": "^22.15.21",
59-
"@types/react": "^19.1.5",
60-
"@types/react-dom": "^19.1.5",
55+
"@eslint-react/eslint-plugin": "^1.51.0",
56+
"@next/eslint-plugin-next": "^15.3.3",
57+
"@tailwindcss/postcss": "^4.1.8",
58+
"@types/node": "^22.15.29",
59+
"@types/react": "^19.1.6",
60+
"@types/react-dom": "^19.1.6",
6161
"@types/rss": "^0.0.32",
62-
"eslint": "^9.27.0",
62+
"eslint": "^9.28.0",
6363
"eslint-plugin-format": "^1.0.1",
6464
"eslint-plugin-react-hooks": "^5.2.0",
6565
"eslint-plugin-react-refresh": "^0.4.20",
6666
"eslint-plugin-tailwindcss": "^3.18.0",
6767
"husky": "^9.1.7",
68-
"lint-staged": "^16.0.0",
69-
"postcss": "^8.5.3",
68+
"lint-staged": "^16.1.0",
69+
"postcss": "^8.5.4",
7070
"postcss-flexbugs-fixes": "^5.0.2",
71-
"postcss-preset-env": "^10.1.6",
71+
"postcss-preset-env": "^10.2.0",
7272
"prettier": "^3.5.3",
7373
"rss": "^1.2.2",
74-
"tailwindcss": "^4.1.7",
74+
"tailwindcss": "^4.1.8",
7575
"typescript": "^5.8.3"
7676
},
7777
"lint-staged": {

0 commit comments

Comments
 (0)