Skip to content

Commit 965b97f

Browse files
committed
patch
1 parent 758764e commit 965b97f

File tree

4 files changed

+44
-78
lines changed

4 files changed

+44
-78
lines changed

.github/workflows/deploy.yml

Lines changed: 25 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -6,34 +6,7 @@ on:
66
pull_request:
77
branches: [ main ]
88

9-
permissions:
10-
contents: read
11-
pages: write
12-
id-token: write
13-
14-
concurrency:
15-
group: "pages"
16-
cancel-in-progress: true
17-
189
jobs:
19-
typecheck:
20-
runs-on: ubuntu-latest
21-
steps:
22-
- name: Checkout
23-
uses: actions/checkout@v4
24-
25-
- name: Setup Node.js
26-
uses: actions/setup-node@v4
27-
with:
28-
node-version: '22'
29-
cache: 'npm'
30-
31-
- name: Install dependencies
32-
run: npm ci
33-
34-
- name: Run type check
35-
run: npm run check
36-
3710
build:
3811
runs-on: ubuntu-latest
3912

@@ -50,53 +23,46 @@ jobs:
5023
- name: Install dependencies
5124
run: npm ci
5225

53-
- name: Cache embeddings and blog context
54-
uses: actions/cache@v4
55-
id: cache-embeddings
56-
with:
57-
path: |
58-
dist/static/data/vectors.json
59-
dist/static/data/index.json
60-
dist/static/data/.content-hash
61-
key: embeddings-${{ hashFiles('src/content/posts/**/*.md', 'src/pages/about.md', 'src/content/resume.*') }}
62-
restore-keys: |
63-
embeddings-
64-
65-
- name: Restore cached files
66-
if: steps.cache-embeddings.outputs.cache-hit == 'true'
67-
run: |
68-
echo "✅ Using cached embeddings and blog context"
69-
mkdir -p dist/static/data dist/static/js
70-
71-
- name: Cache transformer models
72-
uses: actions/cache@v4
73-
with:
74-
path: ~/.cache/huggingface
75-
key: transformers-${{ hashFiles('**/package-lock.json') }}
76-
restore-keys: |
77-
transformers-
26+
- name: Run type check
27+
run: npm run check
7828

7929
- name: Build site
8030
run: npm run build
8131
env:
8232
NODE_ENV: production
8333

84-
- name: Setup Pages
85-
uses: actions/configure-pages@v4
86-
87-
- name: Upload artifact
88-
uses: actions/upload-pages-artifact@v3
34+
- name: Upload build output
35+
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
36+
uses: actions/upload-artifact@v4
8937
with:
90-
path: './dist'
38+
name: dist
39+
path: dist
9140

9241
deploy:
42+
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
43+
permissions:
44+
pages: write
45+
id-token: write
9346
environment:
9447
name: github-pages
9548
url: ${{ steps.deployment.outputs.page_url }}
9649
runs-on: ubuntu-latest
9750
needs: build
9851
steps:
52+
- name: Download build output
53+
uses: actions/download-artifact@v4
54+
with:
55+
name: dist
56+
path: dist
57+
58+
- name: Setup Pages
59+
uses: actions/configure-pages@v4
60+
61+
- name: Upload artifact
62+
uses: actions/upload-pages-artifact@v3
63+
with:
64+
path: './dist'
65+
9966
- name: Deploy to GitHub Pages
10067
id: deployment
10168
uses: actions/deploy-pages@v4
102-

package-lock.json

Lines changed: 17 additions & 17 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/components/pages/HomePage.astro

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,7 @@ const isActiveLink = (href: string) => {
206206
{post.data.tags.map(tag => {
207207
const tagSearchHref = `${tagsPageHref}?q=${encodeURIComponent(tag)}`;
208208
return (
209-
<a href={tagSearchHref} class="tag" key={tag}>{tag}</a>
209+
<a href={tagSearchHref} class="tag">{tag}</a>
210210
);
211211
})}
212212
</div>

src/components/pages/PostPage.astro

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ const toggleDisabled = !alternateSlug;
5555
{post.data.tags.map(tag => {
5656
const tagSearchHref = `${tagsPageHref}?q=${encodeURIComponent(tag)}`;
5757
return (
58-
<a href={tagSearchHref} class="tag" key={tag}>{tag}</a>
58+
<a href={tagSearchHref} class="tag">{tag}</a>
5959
);
6060
})}
6161
</div>

0 commit comments

Comments
 (0)