ci: publish setup
Build & Deploy (CF Workers) / build-deploy (push) Failing after 1m0s

This commit is contained in:
yigid authored and Yigid BALABAN committed 2026-11-01 15:24:35 +03:00
1 parent f5e0ec64e4
commit a1b102990a
15 files changed
+4040 -16

No files matched your search

+2
View File
@@ -15,6 +15,8 @@ Entrypoint for project memory. Read this before working in the repo.
- [Hero scale, shared grid, smooth scroll](./memories/hero-grid-scroll-2026-11-01.md) — 75% hero title, one horizontal grid for all sections, smooth back-to-top.
- [Motion pass](./memories/motion-pass-2026-11-01.md) — drifting three-aura backdrop, scroll-lit path nodes, bobbing hero peacock, iridescent footer "Project".
- [Hero scroll cue and gradient](./memories/hero-cue-gradient-2026-11-01.md) — restored scroll cue and iridescent italic hero text.
- [Cloudflare devices build](./memories/cloudflare-devices-build.md) — bundle device data and image manifest for Cloudflare prerendering.
- [Homepage headings restored](./memories/homepage-headings-2026-11-01.md) — original h2 copy and gradient spans.
## Current state (2026-11-01)
@@ -0,0 +1,5 @@
# Cloudflare devices build
- Cloudflare's Astro prerenderer runs in a Worker where `process.cwd()` is `/bundle`; local `public/` files cannot be read using `node:fs`.
- `src/pages/devices.astro` imports `public/devices/status.json?raw` and uses a Vite glob for the device image manifest. The generator and public URLs remain unchanged.
- Verified `npm run build` with the Cloudflare adapter, including temporary image fixtures to check image priority and output, and all device cards.
@@ -0,0 +1,7 @@
# Homepage headings restored
Date: 2026-11-01
- Restored the three original homepage h2 texts and their italic iridescent spans, matching peacockos.org.
- The existing responsive h2 font size already matched the original: `clamp(38px,6vw,76px)`.
- Kept the redesigned surrounding copy, layout, and single-h1 page structure.
+28
View File
@@ -0,0 +1,28 @@
name: Build & Deploy (CF Workers)
on:
push:
branches: ["master"]
workflow_dispatch:
jobs:
build-deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: Set up pnpm
uses: pnpm/setup@v1
with:
version: 11
runtime: node@24
cache: true
- name: Build
run: pnpm build
- name: Deploy to Cloudflare Workers
if: github.event_name != 'pull_request' && github.ref == 'refs/heads/master'
env:
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
run: pnpm exec wrangler deploy --message "${{ github.sha }}"
+7
View File
@@ -10,3 +10,10 @@ node_modules/
# python
__pycache__/
# wrangler files
.wrangler
.dev.vars*
!.dev.vars.example
.env*
!.env.example
+5
View File
@@ -1,11 +1,16 @@
import { defineConfig } from 'astro/config';
import cloudflare from '@astrojs/cloudflare';
// Static site, ported 1:1 from the hand-written build in `../site`.
// Pages are emitted as `<route>/index.html`, matching the original layout.
export default defineConfig({
site: 'https://peacockos.org',
build: {
format: 'directory',
},
trailingSlash: 'ignore',
adapter: cloudflare(),
});
+979 -3
View File
File diff suppressed because it is too large. Load diff
+8 -2
View File
@@ -6,10 +6,16 @@
"scripts": {
"dev": "astro dev",
"build": "astro build",
"preview": "astro preview",
"astro": "astro"
"preview": "npm run build && wrangler dev",
"astro": "astro",
"generate-types": "wrangler types",
"deploy": "npm run build && wrangler deploy"
},
"dependencies": {
"@astrojs/cloudflare": "^14.4.3",
"astro": "^7.4.4"
},
"devDependencies": {
"wrangler": "^4.156.0"
}
}
+2964
View File
File diff suppressed because it is too large. Load diff
+2
View File
@@ -0,0 +1,2 @@
_worker.js
_routes.json
+6 -6
View File
@@ -1,14 +1,14 @@
---
import fs from 'node:fs';
import path from 'node:path';
import status from '../../public/devices/status.json?raw';
import Base from '../layouts/Base.astro';
// The device list is generated from peacock-ports' status.toml by
// scripts/gen-devices.py, which writes public/devices/status.json. Rendering it
// here (instead of generating a whole HTML page) keeps the data pipeline and
// the page markup independent.
const root = process.cwd();
const payload = JSON.parse(fs.readFileSync(path.join(root, 'public/devices/status.json'), 'utf8'));
// the page markup independent. Vite bundles the data and image manifest so
// Cloudflare's prerenderer doesn't need access to the local filesystem.
const payload = JSON.parse(status);
const images = import.meta.glob('../../public/devices/img/*.{webp,png,jpg,jpeg,avif}', { eager: true, query: '?url', import: 'default' });
const WIKI = 'https://wiki.peacockos.org';
const IMG_EXTS = ['webp', 'png', 'jpg', 'jpeg', 'avif'];
@@ -26,7 +26,7 @@ function platform(d) {
function imageFor(code) {
for (const ext of IMG_EXTS) {
if (fs.existsSync(path.join(root, 'public/devices/img', `${code}.${ext}`))) {
if (Object.hasOwn(images, `../../public/devices/img/${code}.${ext}`)) {
return `/devices/img/${code}.${ext}`;
}
}
+3 -3
View File
@@ -20,7 +20,7 @@ import Mark from '../components/Mark.astro';
<section class="module">
<div class="wrap stmt reveal">
<h2>You own the hardware. Software should be yours, too.</h2>
<h2>Your phone, <span class="grad">handed back.</span></h2>
<p>Peacock isn't a phone company. It's a build system, a boot chain, and a recovery environment that together let you put Linux on hardware you already own, with no account and no vendor in the middle.</p>
</div>
</section>
@@ -28,7 +28,7 @@ import Mark from '../components/Mark.astro';
<section class="module path-module">
<div class="wrap">
<div class="path-head reveal">
<h2>From a stock phone to one you control.</h2>
<h2>From factory-locked to <span class="grad">truly yours.</span></h2>
<p class="path-sub">Four steps that run into each other, not four separate products. Each one takes the same phone closer to something you own.</p>
</div>
<div class="spine-wrap">
@@ -47,7 +47,7 @@ import Mark from '../components/Mark.astro';
<section class="module">
<div class="wrap">
<div class="reveal">
<h2>Two places to start.</h2>
<h2>Two front doors, <span class="grad">now open.</span></h2>
</div>
<div class="doors reveal">
<a class="door" href="https://wiki.peacockos.org">
+2
View File
@@ -127,6 +127,8 @@
.module{position:relative;padding:clamp(80px,14vh,160px) var(--pad);}
.wrap{max-width:var(--maxw);margin:0 auto;}
.module h1,.module h2{font-family:var(--serif);font-size:clamp(38px,6vw,76px);line-height:.98;letter-spacing:-.01em;margin:0;}
.module h2 .grad{font-style:italic;background:var(--irid);-webkit-background-clip:text;background-clip:text;
color:transparent;-webkit-text-fill-color:transparent;}
.stmt p{margin:26px 0 0;max-width:54ch;font-size:clamp(16px,1.6vw,20px);line-height:1.6;color:var(--ink2);}
.page-head{padding-top:clamp(110px,16vh,170px);}
+8 -2
View File
@@ -1,5 +1,11 @@
{
"extends": "astro/tsconfigs/strict",
"include": [".astro/types.d.ts", "**/*"],
"exclude": ["dist"]
"include": [
".astro/types.d.ts",
"**/*",
"./worker-configuration.d.ts"
],
"exclude": [
"dist"
]
}
+14
View File
@@ -0,0 +1,14 @@
{
"$schema": "./node_modules/wrangler/config-schema.json",
"compatibility_date": "2026-10-23",
"compatibility_flags": ["global_fetch_strictly_public"],
"name": "peacock-site",
"main": "@astrojs/cloudflare/entrypoints/server",
"assets": {
"directory": "./dist",
"binding": "ASSETS"
},
"observability": {
"enabled": true
}
}