ci) add gitea actions and refresh readme (#1)
Some checks failed
Build and Push Image / docker-build-and-push (push) Failing after 2m13s
Some checks failed
Build and Push Image / docker-build-and-push (push) Failing after 2m13s
Summary:\n- replace scaffold README with project-specific setup, testing, Docker, and CI docs\n- add PR workflow to run lint, unit tests, app build, and Docker build\n- add main-branch workflow to build and push Docker images to Gitea registry\n\nNotes:\n- publish workflow expects REGISTRY_USERNAME and REGISTRY_PASSWORD repository secrets\n- image tags pushed: latest and short commit SHA\n\nTesting:\n- not run locally (workflows execute in Gitea Actions) Reviewed-on: CampbellWireless/trips#1 Co-authored-by: Shaun Campbell <shaun@campbellwireless.net> Co-committed-by: Shaun Campbell <shaun@campbellwireless.net>
This commit was merged in pull request #1.
This commit is contained in:
99
README.md
99
README.md
@@ -1,35 +1,96 @@
|
||||
# sv
|
||||
# trips
|
||||
|
||||
Everything you need to build a Svelte project, powered by [`sv`](https://github.com/sveltejs/cli).
|
||||
A SvelteKit travel planning app for managing trips, travelers, transportation, lodgings, package tours, checklists, and experiences.
|
||||
|
||||
## Creating a project
|
||||
## Tech Stack
|
||||
|
||||
If you're seeing this, you've probably already done this step. Congrats!
|
||||
- SvelteKit + TypeScript
|
||||
- SQLite (`bun:sqlite`)
|
||||
- Vitest for unit tests
|
||||
- Biome + Prettier for code quality
|
||||
- Bun for local/deploy build and runtime workflows
|
||||
- Docker multi-stage build for production image
|
||||
|
||||
## Features
|
||||
|
||||
- Authenticated trip dashboard with upcoming/past trip views
|
||||
- Trip planning with:
|
||||
- flights
|
||||
- private vehicles
|
||||
- other transportation
|
||||
- lodgings
|
||||
- package tours
|
||||
- checklists
|
||||
- experiences
|
||||
- Admin flows for travel reference data and tour operator/tour management
|
||||
|
||||
## Local Development
|
||||
|
||||
### Requirements
|
||||
|
||||
- Bun 1.x
|
||||
|
||||
### Setup
|
||||
|
||||
```sh
|
||||
# create a new project
|
||||
npx sv create my-app
|
||||
cp .env.example .env
|
||||
bun install
|
||||
```
|
||||
|
||||
## Developing
|
||||
|
||||
Once you've created a project and installed dependencies with `npm install` (or `pnpm install` or `yarn`), start a development server:
|
||||
### Run
|
||||
|
||||
```sh
|
||||
npm run dev
|
||||
|
||||
# or start the server and open the app in a new browser tab
|
||||
npm run dev -- --open
|
||||
bun run dev
|
||||
```
|
||||
|
||||
## Building
|
||||
|
||||
To create a production version of your app:
|
||||
## Quality and Tests
|
||||
|
||||
```sh
|
||||
npm run build
|
||||
bun run lint
|
||||
bun run test
|
||||
bun run check
|
||||
```
|
||||
|
||||
You can preview the production build with `npm run preview`.
|
||||
## Build and Preview
|
||||
|
||||
> To deploy your app, you may need to install an [adapter](https://svelte.dev/docs/kit/adapters) for your target environment.
|
||||
```sh
|
||||
bun run build
|
||||
bun run preview
|
||||
```
|
||||
|
||||
## Docker
|
||||
|
||||
### Build locally
|
||||
|
||||
```sh
|
||||
docker build -t trips:local .
|
||||
```
|
||||
|
||||
### Run locally
|
||||
|
||||
```sh
|
||||
docker compose up --build
|
||||
```
|
||||
|
||||
The container stores SQLite data at `/data/trips.db` (mounted as the `trips-data` volume in `docker-compose.yml`).
|
||||
|
||||
## CI (Gitea Actions)
|
||||
|
||||
Workflows live in `.gitea/workflows`:
|
||||
|
||||
- `pr-checks.yml`: runs lint, tests, and Docker build on pull requests.
|
||||
- `main-image.yml`: builds and pushes a Docker image on push to `main`.
|
||||
|
||||
### Registry secrets for image publish
|
||||
|
||||
Configure these repository secrets in Gitea:
|
||||
|
||||
- `REGISTRY_USERNAME`
|
||||
- `REGISTRY_PASSWORD`
|
||||
|
||||
By default, the publish workflow pushes to:
|
||||
|
||||
- `git.campbellwireless.net/<owner>/<repo>:latest`
|
||||
- `git.campbellwireless.net/<owner>/<repo>:<short-sha>`
|
||||
|
||||
If your registry host differs, edit `REGISTRY_HOST` in `.gitea/workflows/main-image.yml`.
|
||||
|
||||
Reference in New Issue
Block a user