Skip to content

Commit 747cfae

Browse files
committed
Merge branch 'reactpress' of github.com:b9348/b9348.github.io into reactpress
2 parents a266dc0 + 405d4c4 commit 747cfae

File tree

1 file changed

+28
-22
lines changed

1 file changed

+28
-22
lines changed

.github/workflows/deploy.yml

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

88
jobs:
99
deploy:
10+
name: Deploy
1011
runs-on: ubuntu-latest
1112

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

16-
- name: Setup Node.js
17-
uses: actions/setup-node@v4
21+
- name: Install Deno
22+
uses: denoland/setup-deno@v2
1823
with:
19-
node-version: 18 # 使用与项目兼容的 Node 版本
24+
deno-version: v2.x
2025

21-
- name: Install dependencies
22-
run: npm install
26+
- name: Install Node.js
27+
uses: actions/setup-node@v4
28+
with:
29+
node-version: lts/*
2330

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

27-
- name: Configure Git
28-
run: |
29-
git config --global user.name "GitHub Actions"
30-
git config --global user.email "[email protected]"
34+
- name: Build step
35+
run: "yarn run build"
3136

32-
- name: Deploy to gh-pages
33-
uses: peaceiris/actions-gh-pages@v3
37+
- name: Upload to Deno Deploy
38+
uses: denoland/deployctl@v1
3439
with:
35-
github_token: ${{ secrets.GITHUB_TOKEN }}
36-
publish_dir: ./build
37-
force_orphan: true
38-
keep_files: false
40+
project: "b9348"
41+
entrypoint: "https://deno.land/[email protected]/http/file_server.ts"
42+
root: "build"
43+
44+

0 commit comments

Comments
 (0)