Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 58479d7

Browse files
committed
chore: deploy to cf workers
1 parent 308a2c3 commit 58479d7

File tree

5 files changed

+969
-2
lines changed

5 files changed

+969
-2
lines changed

‎.github/workflows/cloudflare.yml‎

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: Deploy to Cloudflare Workers
2+
3+
on:
4+
push:
5+
branches: [main]
6+
workflow_dispatch:
7+
8+
jobs:
9+
deploy:
10+
runs-on: ubuntu-latest
11+
name: Deploy to Cloudflare Workers
12+
steps:
13+
- uses: actions/checkout@v4
14+
with:
15+
fetch-depth: 0
16+
17+
- name: Setup pnpm
18+
uses: pnpm/action-setup@v4
19+
20+
- name: Setup Node.js
21+
uses: actions/setup-node@v4
22+
with:
23+
node-version: 22
24+
cache: pnpm
25+
26+
- name: Install dependencies
27+
run: pnpm install --frozen-lockfile
28+
29+
- name: Build with VitePress
30+
run: pnpm run docs:build
31+
32+
- name: Deploy to Cloudflare Workers
33+
uses: cloudflare/wrangler-action@v3
34+
with:
35+
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
36+
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
37+
command: deploy

‎package.json‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
11
{
22
"packageManager": "pnpm@9.0.0",
33
"devDependencies": {
4-
"vitepress": "^2.0.0-alpha.12"
4+
"vitepress": "^2.0.0-alpha.12",
5+
"wrangler": "^4.44.0"
56
},
67
"scripts": {
78
"docs:dev": "vitepress dev docs",
89
"docs:build": "vitepress build docs",
9-
"docs:preview": "vitepress preview docs"
10+
"docs:preview": "vitepress preview docs",
11+
"deploy:cf": "pnpm run docs:build && wrangler deploy"
1012
},
1113
"dependencies": {
1214
"vitepress-plugin-comment-with-giscus": "^1.1.15"

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /