Skip to content

Commit fbc96bf

Browse files
committed
vercel部署以及友链添加
1 parent ac7a46b commit fbc96bf

File tree

2 files changed

+103
-0
lines changed

2 files changed

+103
-0
lines changed

.github/workflows/deploy.yml

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
name: Deploy to Vercel
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
pull_request:
7+
branches: [ main ]
8+
9+
jobs:
10+
deploy:
11+
runs-on: ubuntu-latest
12+
13+
strategy:
14+
matrix:
15+
node-version: [18.x]
16+
17+
steps:
18+
- uses: actions/checkout@v3
19+
20+
- name: Install Node.js
21+
uses: actions/setup-node@v3
22+
with:
23+
node-version: ${{ matrix.node-version }}
24+
cache: 'npm'
25+
26+
- name: Install dependencies
27+
run: npm install
28+
29+
- name: Build
30+
run: npm run build
31+
env:
32+
DATABASE_URL: ${{ secrets.DATABASE_URL }}
33+
S3_REGION: ${{ secrets.S3_REGION }}
34+
S3_ENDPOINT: ${{ secrets.S3_ENDPOINT }}
35+
S3_ACCESS_KEY: ${{ secrets.S3_ACCESS_KEY }}
36+
S3_SECRET_KEY: ${{ secrets.S3_SECRET_KEY }}
37+
S3_BUCKET: ${{ secrets.S3_BUCKET }}
38+
39+
- name: Deploy to Vercel
40+
uses: amondnet/vercel-action@v25
41+
with:
42+
vercel-token: ${{ secrets.VERCEL_TOKEN }}
43+
vercel-org-id: ${{ secrets.VERCEL_ORG_ID }}
44+
vercel-project-id: ${{ secrets.VERCEL_PROJECT_ID }}
45+
scope: ${{ secrets.VERCEL_ORG_ID }}
46+
working-directory: ./
47+
production: true

src/pages/index.astro

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,51 @@ const files = await s3
7272
font-size: 1.1rem;
7373
margin-bottom: 2rem;
7474
}
75+
.links-section {
76+
margin-top: 3rem;
77+
padding-top: 2rem;
78+
border-top: 2px solid rgba(255, 255, 255, 0.2);
79+
width: 100%;
80+
max-width: 600px;
81+
}
82+
.links-title {
83+
font-size: 1.3rem;
84+
margin-bottom: 1.5rem;
85+
color: white;
86+
text-align: center;
87+
}
88+
.links-container {
89+
display: grid;
90+
grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
91+
gap: 1rem;
92+
}
93+
.link-card {
94+
background: rgba(255, 255, 255, 0.1);
95+
border: 1px solid rgba(255, 255, 255, 0.2);
96+
border-radius: 8px;
97+
padding: 1.2rem;
98+
text-align: center;
99+
transition: all 0.3s ease;
100+
text-decoration: none;
101+
color: white;
102+
backdrop-filter: blur(10px);
103+
}
104+
.link-card:hover {
105+
background: rgba(255, 255, 255, 0.2);
106+
transform: translateY(-5px);
107+
box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
108+
border-color: #ffd700;
109+
}
110+
.link-name {
111+
font-weight: bold;
112+
font-size: 1.1rem;
113+
margin-bottom: 0.5rem;
114+
color: #ffd700;
115+
}
116+
.link-desc {
117+
font-size: 0.9rem;
118+
color: rgba(255, 255, 255, 0.8);
119+
}
75120
</style>
76121
</head>
77122
<body>
@@ -83,6 +128,17 @@ const files = await s3
83128
<!-- 如果不加 client:load,它就是静态 HTML,Elm 动不了 -->
84129
<ElmWrapper targetNumber={targetNumber} client:load />
85130

131+
<!-- 友链区域 -->
132+
<div class="links-section">
133+
<h2 class="links-title">🔗 友情链接</h2>
134+
<div class="links-container">
135+
<a href="https://tool.nexur.top" target="_blank" rel="noopener noreferrer" class="link-card">
136+
<div class="link-name">OpenDevTools</div>
137+
<div class="link-desc">OD工具箱</div>
138+
</a>
139+
</div>
140+
</div>
141+
86142
</body>
87143
</html>
88144

0 commit comments

Comments
 (0)