Skip to content

Commit 0822beb

Browse files
committed
publish docs
1 parent b15a02a commit 0822beb

2 files changed

Lines changed: 52 additions & 0 deletions

File tree

.github/workflows/docs.yml

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
name: Deploy Docs Site
2+
3+
on:
4+
push:
5+
branches: [main]
6+
paths:
7+
- 'docs/**'
8+
- '.github/workflows/docs.yml'
9+
workflow_dispatch:
10+
11+
jobs:
12+
deploy:
13+
runs-on: ubuntu-latest
14+
permissions:
15+
contents: read
16+
deployments: write
17+
18+
steps:
19+
- uses: actions/checkout@v4
20+
21+
- name: Setup Node.js
22+
uses: actions/setup-node@v4
23+
with:
24+
node-version: '24'
25+
cache: 'npm'
26+
cache-dependency-path: docs/site/package-lock.json
27+
28+
- name: Install dependencies
29+
working-directory: docs/site
30+
run: npm ci
31+
32+
- name: Build site
33+
working-directory: docs/site
34+
run: npm run build
35+
36+
- name: Create project if needed
37+
uses: cloudflare/wrangler-action@v3
38+
continue-on-error: true
39+
with:
40+
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
41+
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
42+
command: pages project create hone-fyi --production-branch=main
43+
44+
- name: Deploy to Cloudflare Pages
45+
uses: cloudflare/wrangler-action@v3
46+
with:
47+
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
48+
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
49+
command: pages deploy docs/site/_site --project-name=hone-fyi --commit-dirty=true

docs/site/wrangler.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Cloudflare Pages configuration for hone.fyi (docs)
2+
name = "hone-fyi"
3+
pages_build_output_dir = "_site"

0 commit comments

Comments
 (0)