Portfolio/README.md
Matthew L McPeak cb287c0e51
All checks were successful
ci / build (push) Successful in 30s
ci / publish (push) Successful in 18s
Inital Commit
2026-07-16 12:38:41 -04:00

90 lines
2.1 KiB
Markdown

# portfolio
Personal portfolio site built with Vue 3, Vite, and Tailwind CSS, styled with
the `@nychthemeron/library` design system (private package, published to the
Forgejo registry at `git.mcpeakdev.com`). Content is fetched at runtime from
a small key-value API rather than baked into the bundle (see
`src/composables/useAPI.ts`).
## Project Setup
```sh
bun install
```
Copy `sample.env` to `.env` and fill in `VITE_API_URL` / `VITE_API_KEY` for
the content API.
### Compile and Hot-Reload for Development
```sh
bun dev
```
### Type-Check, Compile and Minify for Production
```sh
bun run build
```
### Run Unit Tests with [Vitest](https://vitest.dev/)
```sh
bun test:unit
```
### Run End-to-End Tests with [Playwright](https://playwright.dev)
```sh
# Install browsers for the first run
npx playwright install
# When testing on CI, must build the project first
bun run build
# Runs the end-to-end tests
bun test:e2e
# Runs the tests only on Chromium
bun test:e2e --project=chromium
# Runs the tests of a specific file
bun test:e2e tests/example.spec.ts
# Runs the tests in debug mode
bun test:e2e --debug
```
### Lint and Format
Linting runs both [oxlint](https://oxc.rs/docs/guide/usage/linter.html) and
[ESLint](https://eslint.org/); formatting uses [oxfmt](https://oxc.rs/).
```sh
bun lint
bun format
```
## Docker
The Dockerfile serves a pre-built `dist/` directory via nginx, so build the
app first:
```sh
bun run build
docker build -t portfolio .
docker run --rm -p 8080:80 portfolio
```
The site will be available at http://localhost:8080.
### CI publishing
A Forgejo Actions workflow (`.forgejo/workflows/ci.yml`) runs tests, type
checks, and a build on every push and pull request. When a `v*` tag is
pushed (e.g. `v1.2.3`), it also builds and pushes the image to the Forgejo
container registry:
- `git.mcpeakdev.com/mcpeakml/portfolio:<version>`
- `git.mcpeakdev.com/mcpeakml/portfolio:latest`
This requires a `REGISTRY_TOKEN` repository secret containing a token with
`write:package` permission for the registry, plus `VITE_API_URL` /
`VITE_API_KEY` build-time variables (see `ci.yml`).