Skip to content

Commit 8da1edc

Browse files
Added CI
1 parent 6c89d9d commit 8da1edc

4 files changed

Lines changed: 52 additions & 1 deletion

File tree

.github/workflows/ci.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
branches: [main]
8+
9+
jobs:
10+
build:
11+
name: Build
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@v4
15+
- uses: actions/setup-node@v4
16+
with:
17+
node-version: 20
18+
cache: npm
19+
- run: npm ci
20+
- name: Build
21+
run: npm run build

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# Cloudcore Next.js Frontend
22

3+
![CI](https://github.com/cloudcore-cms/cloudcore-next/actions/workflows/ci.yml/badge.svg)
4+
35
A Next.js App Router starter for [Cloudcore CMS](https://github.com/cloudcore-cms/cloudcore-cms).
46

57
[![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/new/clone?repository-url=https://github.com/cloudcore-cms/cloudcore-next)

next-env.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/// <reference types="next" />
22
/// <reference types="next/image-types/global" />
3-
import "./.next/dev/types/routes.d.ts";
3+
import "./.next/types/routes.d.ts";
44

55
// NOTE: This file should not be edited
66
// see https://nextjs.org/docs/app/api-reference/config/typescript for more information.

public/media/README.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# Local Media Folder
2+
3+
This folder is for storing local media files that will be copied to `public/media/` during the build process.
4+
5+
## Usage
6+
7+
1. Add your images, videos, or other media files to this `media/` folder
8+
2. Organize them in subfolders if needed (e.g., `media/images/`, `media/icons/`)
9+
3. Run `npm run build` - files will automatically be copied to `public/media/`
10+
4. Reference them in your code as `/media/your-file.jpg`
11+
12+
## Development vs Production
13+
14+
- **Development**: Files in `media/` are NOT automatically served. Run `npm run copy-media` to copy them to `public/media/` for local testing.
15+
- **Production**: The build script automatically copies media files before building.
16+
17+
## Workflow for Forking
18+
19+
1. Fork the repository
20+
2. Add your images to this `media/` folder
21+
3. Commit and deploy
22+
4. The deployment will run `npm run build`, which copies media to public
23+
24+
## Notes
25+
26+
- The `.gitkeep` file ensures this folder exists in git (it won't be copied)
27+
- Files in `public/media/` are gitignored to avoid duplicating assets
28+
- For CMS-managed media, use the admin panel upload instead

0 commit comments

Comments
 (0)