Skip to content

Commit d841575

Browse files
committed
更新
1 parent 75a39d0 commit d841575

6 files changed

Lines changed: 62 additions & 149 deletions

File tree

.github/dependabot.yml

Lines changed: 0 additions & 22 deletions
This file was deleted.

.github/deploy.yml

Lines changed: 0 additions & 39 deletions
This file was deleted.

.github/workflows/biome.yml

Lines changed: 0 additions & 20 deletions
This file was deleted.

.github/workflows/build.yml

Lines changed: 0 additions & 67 deletions
This file was deleted.

.github/workflows/deploy.yml

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
name: Deploy to GitHub Pages
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
pull_request:
7+
branches: [ main ]
8+
workflow_dispatch:
9+
10+
jobs:
11+
build-and-deploy:
12+
runs-on: ubuntu-latest
13+
14+
permissions:
15+
contents: write
16+
pages: write
17+
id-token: write
18+
19+
steps:
20+
- name: Checkout
21+
uses: actions/checkout@v4
22+
with:
23+
fetch-depth: 0
24+
25+
- name: Setup Node.js
26+
uses: actions/setup-node@v4
27+
with:
28+
node-version: '20'
29+
30+
- name: Setup pnpm
31+
uses: pnpm/action-setup@v4
32+
with:
33+
version: 9.14.4
34+
run_install: false
35+
36+
- name: Get pnpm store directory
37+
shell: bash
38+
run: |
39+
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
40+
41+
- name: Setup pnpm cache
42+
uses: actions/cache@v4
43+
with:
44+
path: ${{ env.STORE_PATH }}
45+
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
46+
restore-keys: |
47+
${{ runner.os }}-pnpm-store-
48+
49+
- name: Install dependencies
50+
run: pnpm install --frozen-lockfile
51+
52+
- name: Build project
53+
run: pnpm build
54+
55+
- name: Deploy to web branch
56+
uses: peaceiris/actions-gh-pages@v4
57+
if: github.ref == 'refs/heads/main'
58+
with:
59+
github_token: ${{ secrets.GITHUB_TOKEN }}
60+
publish_dir: ./dist
61+
publish_branch: web
62+
force_orphan: true

astro.config.mjs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ import { pluginCustomCopyButton } from "./src/plugins/expressive-code/custom-cop
2727
// https://astro.build/config
2828
export default defineConfig({
2929
site: "https://neu233.github.io/",
30-
base: "/dist",
3130
trailingSlash: "always",
3231
integrations: [
3332
tailwind({

0 commit comments

Comments
 (0)