Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: "20"
node-version: "22"
cache: npm

- name: Install dependencies
Expand All @@ -44,6 +44,9 @@ jobs:
- name: Run fixture demo
run: node dist/index.js demo

- name: Verify deployment metadata
run: node dist/index.js deploy --adapter netlify --output output/

- name: Store demo output
if: success()
uses: actions/upload-artifact@v4
Expand Down
58 changes: 58 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
name: Deploy portfolio to GitHub Pages

on:
schedule:
- cron: "23 5 * * 1"
workflow_dispatch:

permissions:
contents: read
pages: write
id-token: write

concurrency:
group: engineer-profile-pages
cancel-in-progress: true

jobs:
deploy:
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.pages.outputs.base_url }}
env:
GITHUB_TOKEN: ${{ github.token }}
steps:
- name: Check out source
uses: actions/checkout@v4

- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: "22"
cache: npm

- name: Install dependencies
run: npm ci

- name: Install Chromium
run: npx playwright install chromium --with-deps

- name: Refresh portfolio
run: npm run refresh -- --config engineer-profile.config.json

- name: Stage deployment files
run: node dist/index.js deploy --output output/

- name: Configure GitHub Pages
id: pages
uses: actions/configure-pages@v5

- name: Upload site artifact
uses: actions/upload-pages-artifact@v3
with:
path: output/

- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
2 changes: 1 addition & 1 deletion .github/workflows/refresh.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: "20"
node-version: "22"
cache: npm

- name: Install dependencies
Expand Down
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
20
22
11 changes: 9 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

## Local checks

Use Node.js 20 or newer.
Use Node.js 22 or newer.

```bash
npm ci
Expand All @@ -19,4 +19,11 @@ Do not add credentials, private repository data, or generated output.

Explain the user value and the data path.
List the checks that you ran.
Keep public claims tied to repository evidence.
Keep public claims tied to repository evidence.

## Release checklist

Bump the version in `package.json`.
Run the demo to confirm the fixture pipeline.
Run all checks from the local checklist.
Update the roadmap in the README.
68 changes: 58 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ paths in SQLite. It publishes a static site from these records.
- Refresh project cards from public GitHub repositories.
- Build release notes from releases or conventional commits.
- Capture repeatable project previews with Playwright.
- Choose a site theme from a checked-in token set.
- Write deployment metadata for common static hosts.
- Hide projects and redact author emails before publication.
- Run one configured refresh from a scheduled workflow.

Expand All @@ -27,31 +29,35 @@ flowchart LR
D --> L[Changelog]
D --> P[Privacy]
D --> S[Playwright]
L --> W[Publisher]
T[Theme] --> W[Publisher]
L --> W
P --> W
S --> W
W --> O[Static output]
O --> A[Deploy adapter]
```

| Area | Responsibility |
| --- | --- |
| `engineer-profile.config.json` | Store owner, presentation, refresh, paths, and privacy settings. |
| `engineer-profile.config.json` | Store owner, theme, presentation, refresh, deploy, and privacy settings. |
| `src/config/` | Validate checked-in JSON and merge safe defaults. |
| `src/refresh/` | Coordinate ingest, best-effort capture, and static publishing. |
| `src/theme/` | Resolve site themes and render CSS tokens. |
| `src/refresh/` | Coordinate ingest, best-effort capture, publishing, and deployment files. |
| `src/ingest/` | Fetch public GitHub data and map it to records. |
| `src/db/` | Store projects, commits, changelogs, and audit events. |
| `src/changelog/` | Prefer release notes and fall back to commit groups. |
| `src/privacy/` | Hide projects and block sensitive commit messages. |
| `src/preview/` | Capture fixed viewport screenshots with Playwright. |
| `src/publish/` | Render HTML, changelog files, and preview assets. |
| `src/publish/` | Render themed HTML, changelog files, and preview assets. |
| `src/deploy/` | Write metadata files for static hosts. |
| `fixtures/` | Provide deterministic demo data and local preview pages. |

The refresh command runs each stage in a fixed order.
If a preview fails, the command reports the skip and keeps the rest of the snapshot.

## Setup

Use Node.js 20 or newer.
Use Node.js 22 or newer.

```bash
npm ci
Expand All @@ -68,7 +74,7 @@ Both directories are ignored by Git.
## Configuration

`engineer-profile.config.json` is the checked-in source for scheduled refreshes.
It sets the GitHub owner, site presentation, repository limit, paths, and privacy controls.
It sets the GitHub owner, theme, site presentation, repository limit, deploy settings, and privacy controls.

The loader accepts repository limits from 1 through 100.
It rejects malformed values before network access.
Expand All @@ -81,7 +87,7 @@ npm run refresh
```

The refresh command reads public repositories, captures previews, publishes HTML,
and reports skipped captures.
writes deploy metadata, and reports skipped captures.

GitHub ingestion uses the public API.
Set `GITHUB_TOKEN` for a higher rate limit.
Expand All @@ -94,6 +100,37 @@ npm run refresh
Do not put a token in repository files.
Use `.env.example` as a variable reference.

### Themes

Set `theme` in the configuration file.
Run `node dist/index.js theme` to list the built-in themes.

| Theme | Color scheme |
| --- | --- |
| `dark` | Night field |
| `light` | Daylight |
| `paper` | Archive paper |

The publisher renders the selected theme into the site.
Each theme defines a full token set for text, panels, accents, and shadows.

### Deployment adapters

Set `deploy.adapter` in the configuration file.
Run `node dist/index.js deploy --list` to list the built-in adapters.

| Adapter | Writes |
| --- | --- |
| `gh-pages` | `.nojekyll`, optional `CNAME` |
| `vercel` | `vercel.json` with long cache headers |
| `netlify` | `netlify.toml` with long cache headers |
| `surge` | `CNAME` when a domain is set |
| `none` | No files |

Set `deploy.domain` for adapters that need a custom domain.
The refresh command writes adapter files into the output directory.
A scheduled GitHub Pages workflow publishes the output.

## Sample output

The fixture set contains `signal-router` and `metrics-kit`.
Expand All @@ -106,6 +143,7 @@ Captured demo-engineer-signal-router.
Captured demo-engineer-metrics-kit.
Published 2 projects to output/index.html.
Copied 2 available preview screenshots.
Prepared deployment for gh-pages.
Open output/index.html in a browser.
```

Expand All @@ -123,7 +161,10 @@ Build before direct CLI commands.
| `npm run ingest -- --fixture` | Load fixture records only. |
| `npm run capture -- --fixture` | Capture local fixture pages. |
| `npm run publish` | Rebuild the site from SQLite. |
| `npm run refresh` | Run configured ingest, capture, and publish stages. |
| `npm run deploy` | Write metadata for the configured adapter. |
| `npm run refresh` | Run configured ingest, capture, publish, and deploy stages. |
| `node dist/index.js theme` | List available site themes. |
| `node dist/index.js deploy --list` | List available deployment adapters. |
| `node dist/index.js status` | Show visibility and recent operations. |
| `npm test` | Run deterministic unit and integration tests. |
| `npm run typecheck` | Validate TypeScript types. |
Expand Down Expand Up @@ -154,16 +195,21 @@ The site displays visible projects only.
It links project cards to repositories.
It links release notes to their release pages.
It records local operations in an audit table.
It records deployment preparation with the adapter name.

## CI and test status

The regular CI workflow runs typecheck, build, tests, the fixture demo, and artifact upload.
It also verifies deployment metadata generation.
The scheduled refresh workflow runs each Monday and supports manual dispatch.
It uploads the generated site as a workflow artifact.
The GitHub Pages workflow publishes the site on a schedule or on demand.

The test suite covers these core behaviors:

- Configuration validation and default merging.
- Theme resolution and deterministic CSS output.
- Deployment adapter file generation.
- Conventional commit parsing.
- Release-first changelog generation.
- SQLite upserts and changelog replacement.
Expand Down Expand Up @@ -196,17 +242,19 @@ The fixture pipeline provides deterministic data for repeatable checks.
- Changelog quality depends on releases or conventional commits.
- External pages can fail during capture.
- Capture failures are reported and do not stop publishing.
- Deployment adapters write local files. They do not upload them.
- Publishing creates local files. It does not deploy them.
- Scheduled runs upload artifacts. They do not commit generated output.
- GitHub Pages publishing needs Pages enabled in repository settings.

## Roadmap

| Release | Status | Scope |
| --- | --- | --- |
| v0.1 | Complete | Fixture demo, GitHub ingest, changelog, capture, publish, and privacy controls. |
| v0.2 | Complete | Checked-in configuration, coordinated refresh command, and scheduled artifact workflow. |
| v0.3 | Next | Custom themes and deployment adapters. |
| v0.4 | Later | Commit-diff summaries and an RSS feed. |
| v0.3 | Complete | Custom themes, deployment adapters, and a GitHub Pages workflow. |
| v0.4 | Next | Commit-diff summaries and an RSS feed. |

## License

Expand Down
4 changes: 4 additions & 0 deletions engineer-profile.config.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,13 @@
"owner": "DanielCuevas1208",
"title": "EngineerProfile",
"tagline": "A living index of shipped systems, maintained from repository evidence",
"theme": "dark",
"repositoryLimit": 5,
"dataDir": "data",
"outputDir": "output",
"deploy": {
"adapter": "gh-pages"
},
"privacy": {
"hiddenProjects": [],
"redactEmails": true,
Expand Down
Loading
Loading