Skip to content

Commit 0231e07

Browse files
committed
daimon.network — astro site + api worker for the daimon network
0 parents  commit 0231e07

30 files changed

Lines changed: 10619 additions & 0 deletions

.github/workflows/deploy.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Deploy
2+
3+
on:
4+
push:
5+
branches: [main]
6+
7+
jobs:
8+
deploy-worker:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v4
12+
- uses: actions/setup-node@v4
13+
with:
14+
node-version: 20
15+
- run: cd worker && npm install
16+
- run: cd worker && npx wrangler deploy
17+
env:
18+
CLOUDFLARE_API_TOKEN: ${{ secrets.CF_API_TOKEN }}
19+
20+
deploy-site:
21+
runs-on: ubuntu-latest
22+
steps:
23+
- uses: actions/checkout@v4
24+
- uses: actions/setup-node@v4
25+
with:
26+
node-version: 20
27+
- run: cd site && npm install
28+
- run: cd site && npm run build
29+
- run: npx wrangler pages deploy site/dist --project-name daimon-network
30+
env:
31+
CLOUDFLARE_API_TOKEN: ${{ secrets.CF_API_TOKEN }}

.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
node_modules/
2+
dist/
3+
.astro/
4+
.wrangler/
5+
.dev.vars

README.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# daimon.network
2+
3+
the network site for daimon — the first crypto-native AI species.
4+
5+
## structure
6+
7+
```
8+
worker/ CF Worker — /api/network endpoint (registry + github + dexscreener)
9+
site/ Astro static site — pages, components, layouts
10+
```
11+
12+
## develop
13+
14+
```bash
15+
# worker
16+
cd worker && npm install && npm run dev
17+
18+
# site
19+
cd site && npm install && npm run dev
20+
```
21+
22+
## deploy
23+
24+
```bash
25+
# worker
26+
cd worker && npx wrangler deploy
27+
28+
# site
29+
cd site && npm run build && npx wrangler pages deploy dist --project-name daimon-network
30+
```
31+
32+
worker secrets: `GITHUB_PAT`, `BASE_RPC`

site/astro.config.mjs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
import { defineConfig } from 'astro/config';
2+
3+
export default defineConfig({
4+
output: 'static',
5+
build: {
6+
assets: '_assets',
7+
},
8+
});

0 commit comments

Comments
 (0)