Skip to content

Commit 2902f30

Browse files
jonathanperisclaude
andcommitted
chore: add CI/CodeQL workflows, fix README badges, enhance CLAUDE.md
- Add ci.yml workflow for PR build checks (lint + build) - Add codeql.yml workflow for JavaScript/TypeScript security analysis - Fix README badges to reference actual workflows (ci, deploy, codeql) - Add Live demo and Documentation links to README - Replace inaccurate CI/CD section with workflow table - Add development workflow, repo conventions, and CI/CD details to CLAUDE.md Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 7249d67 commit 2902f30

4 files changed

Lines changed: 104 additions & 7 deletions

File tree

.github/workflows/ci.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: CI
2+
3+
on:
4+
pull_request:
5+
branches: ["main"]
6+
7+
permissions:
8+
contents: read
9+
10+
jobs:
11+
build:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- name: Checkout
15+
uses: actions/checkout@v6
16+
17+
- name: Setup Node
18+
uses: actions/setup-node@v6
19+
with:
20+
node-version: "20"
21+
cache: "npm"
22+
23+
- name: Install dependencies
24+
run: npm ci
25+
26+
- name: Lint
27+
run: npm run lint
28+
29+
- name: Build
30+
run: npm run build
31+
env:
32+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
33+
NEXT_PUBLIC_GA_ID: G-35CN95481D

.github/workflows/codeql.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: CodeQL
2+
3+
on:
4+
push:
5+
branches: ["main"]
6+
pull_request:
7+
branches: ["main"]
8+
schedule:
9+
- cron: "0 6 * * 1"
10+
11+
permissions:
12+
security-events: write
13+
contents: read
14+
15+
jobs:
16+
analyze:
17+
runs-on: ubuntu-latest
18+
steps:
19+
- name: Checkout
20+
uses: actions/checkout@v6
21+
22+
- name: Initialize CodeQL
23+
uses: github/codeql-action/init@v3
24+
with:
25+
languages: javascript-typescript
26+
27+
- name: Autobuild
28+
uses: github/codeql-action/autobuild@v3
29+
30+
- name: Perform CodeQL Analysis
31+
uses: github/codeql-action/analyze@v3

CLAUDE.md

Lines changed: 32 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,10 @@ jonathanperis.github.io/
9090
├── next.config.ts # Static export, cache headers
9191
├── tsconfig.json # strict, ES2017, @/* alias
9292
├── postcss.config.mjs # Tailwind CSS v4
93-
└── .github/workflows/deploy.yml # GitHub Pages deploy on push to main
93+
└── .github/workflows/
94+
├── ci.yml # PR build check (lint + build)
95+
├── deploy.yml # GitHub Pages deploy on push to main
96+
└── codeql.yml # Security analysis (JS/TS)
9497
```
9598

9699
---
@@ -106,6 +109,32 @@ jonathanperis.github.io/
106109

107110
## CI/CD
108111

109-
- **Trigger:** Push to main or manual dispatch
110-
- **Pipeline:** `npm ci``npm run build` → Upload `./out` → Deploy to GitHub Pages
112+
| Workflow | Trigger | Purpose |
113+
|----------|---------|---------|
114+
| `ci.yml` | Pull requests to main | Lint + build validation |
115+
| `deploy.yml` | Push to main / manual dispatch | Build → upload → deploy to GitHub Pages |
116+
| `codeql.yml` | Push, PRs, weekly (Mon 06:00 UTC) | JavaScript/TypeScript security scanning |
117+
111118
- **Dependabot:** Weekly npm + GitHub Actions updates
119+
- **Merge strategy:** Rebase only (squash and merge commits disabled)
120+
- **Branch protection:** Main branch is protected; all changes go through PRs
121+
- **Auto-merge:** Enabled for Dependabot PRs
122+
123+
---
124+
125+
## Development Workflow
126+
127+
1. Create a feature branch from `main`
128+
2. Make changes and push
129+
3. Open a PR targeting `main` — CI runs lint + build automatically
130+
4. After review and green checks, rebase-merge the PR
131+
5. `deploy.yml` triggers automatically on push to main
132+
133+
---
134+
135+
## Repository Conventions
136+
137+
- **GitHub operations:** Always use `gh` CLI
138+
- **Community health files** (CODE_OF_CONDUCT, CONTRIBUTING, SECURITY, SUPPORT) live in the [`.github` repo](https://github.com/jonathanperis/.github) — do not duplicate them here
139+
- **PR strategy:** Branch + PR for all changes, rebase merge only
140+
- **Commit style:** Conventional commits (`feat:`, `fix:`, `chore:`, `docs:`)

README.md

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22

33
> Personal developer portfolio built with Next.js — dynamically fetches GitHub projects, dark terminal aesthetic, print-optimized resume
44
5-
[![CI](https://github.com/jonathanperis/jonathanperis.github.io/actions/workflows/main-release.yml/badge.svg)](https://github.com/jonathanperis/jonathanperis.github.io/actions/workflows/main-release.yml) [![CodeQL](https://github.com/jonathanperis/jonathanperis.github.io/actions/workflows/codeql.yml/badge.svg)](https://github.com/jonathanperis/jonathanperis.github.io/actions/workflows/codeql.yml) [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE)
5+
[![CI](https://github.com/jonathanperis/jonathanperis.github.io/actions/workflows/ci.yml/badge.svg)](https://github.com/jonathanperis/jonathanperis.github.io/actions/workflows/ci.yml) [![Deploy to GitHub Pages](https://github.com/jonathanperis/jonathanperis.github.io/actions/workflows/deploy.yml/badge.svg)](https://github.com/jonathanperis/jonathanperis.github.io/actions/workflows/deploy.yml) [![CodeQL](https://github.com/jonathanperis/jonathanperis.github.io/actions/workflows/codeql.yml/badge.svg)](https://github.com/jonathanperis/jonathanperis.github.io/actions/workflows/codeql.yml) [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE)
66

7-
**[Visit ](https://jonathanperis.github.io/)**
7+
**[Live demo ](https://jonathanperis.github.io/)** | **[Documentation →](CLAUDE.md)**
88

99
---
1010

@@ -55,9 +55,13 @@ Open http://localhost:3000
5555

5656
## CI/CD
5757

58-
The `main-release.yml` workflow builds the site with Node 20, runs `npm ci` and `npm run build`, then uploads the static export to GitHub Pages with `actions/deploy-pages`.
58+
| Workflow | Trigger | Purpose |
59+
|----------|---------|---------|
60+
| `ci.yml` | Pull requests to main | Lint + build check |
61+
| `deploy.yml` | Push to main / manual | Build and deploy to GitHub Pages |
62+
| `codeql.yml` | Push, PRs, weekly schedule | JavaScript/TypeScript security analysis |
5963

60-
The `codeql.yml` workflow runs on push, pull request, and a weekly schedule to analyze the JavaScript/TypeScript codebase.
64+
Dependabot monitors npm and GitHub Actions dependencies weekly.
6165

6266
## License
6367

0 commit comments

Comments
 (0)