Skip to content

Commit 6f45dc0

Browse files
committed
deployOld
1 parent 8b6c86f commit 6f45dc0

File tree

1 file changed

+22
-28
lines changed

1 file changed

+22
-28
lines changed

.github/workflows/deploy.yml

Lines changed: 22 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,44 +1,38 @@
1-
name: Deploy
1+
name: Deploy to GitHub Pages
2+
23
on:
34
push:
4-
branches: reactpress
5-
pull_request:
6-
branches: reactpress
5+
branches:
6+
- reactpress # 如果你的主分支是 master,请改为 master
77

88
jobs:
99
deploy:
10-
name: Deploy
1110
runs-on: ubuntu-latest
1211

13-
permissions:
14-
id-token: write # Needed for auth with Deno Deploy
15-
contents: read # Needed to clone the repository
16-
1712
steps:
18-
- name: Clone repository
13+
- name: Checkout repository
1914
uses: actions/checkout@v4
2015

21-
- name: Install Deno
22-
uses: denoland/setup-deno@v2
23-
with:
24-
deno-version: v2.x
25-
26-
- name: Install Node.js
16+
- name: Setup Node.js
2717
uses: actions/setup-node@v4
2818
with:
29-
node-version: lts/*
19+
node-version: 18 # 使用与项目兼容的 Node 版本
20+
21+
- name: Install dependencies
22+
run: npm install
3023

31-
- name: Install step
32-
run: "yarn "
24+
- name: Build project
25+
run: npm run build
3326

34-
- name: Build step
35-
run: "yarn run build"
27+
- name: Configure Git
28+
run: |
29+
git config --global user.name "GitHub Actions"
30+
git config --global user.email "[email protected]"
3631
37-
- name: Upload to Deno Deploy
38-
uses: denoland/deployctl@v1
32+
- name: Deploy to gh-pages
33+
uses: peaceiris/actions-gh-pages@v3
3934
with:
40-
project: "b9348"
41-
entrypoint: "https://deno.land/[email protected]/http/file_server.ts"
42-
root: "build"
43-
44-
35+
github_token: ${{ secrets.GITHUB_TOKEN }}
36+
publish_dir: ./build
37+
force_orphan: true
38+
keep_files: false

0 commit comments

Comments
 (0)