|
2 | 2 |
|
3 | 3 | [](https://github.com/rgs2151/landing/actions/workflows/pages.yml) |
4 | 4 |
|
5 | | -This repository is a Vite-powered static website with no Jekyll dependency. |
| 5 | +Personal website for [singha.io](https://singha.io/). |
6 | 6 |
|
7 | | -## Files |
| 7 | +The site is a static Vite project. Source files live in the repository; GitHub Actions builds them into `dist/` and deploys that artifact to GitHub Pages. |
8 | 8 |
|
9 | | -- `index.html`: Main homepage |
10 | | -- `stylesheet.css`: Main stylesheet |
11 | | -- `images/`: Hero and work images |
12 | | -- `scripts/`: Research notebooks and supporting artifacts |
13 | | -- `tools/`: Small build helpers |
14 | | -- `favicon.ico`: Site favicon at the repository root |
15 | | -- `CNAME`: Custom domain mapping (`singha.io`) |
| 9 | +## How Publishing Works |
16 | 10 |
|
17 | | -## Local Preview |
| 11 | +`style` is the main branch. |
18 | 12 |
|
19 | | -Run from repository root: |
| 13 | +When you push to `style`, GitHub Actions runs: |
| 14 | + |
| 15 | +```bash |
| 16 | +npm ci |
| 17 | +npm run build |
| 18 | +``` |
| 19 | + |
| 20 | +That creates `dist/`, uploads it as a Pages artifact, and deploys it to `singha.io`. |
| 21 | + |
| 22 | +Do not commit `dist/`. It is generated by the Action. |
| 23 | + |
| 24 | +## Local Development |
| 25 | + |
| 26 | +Install dependencies once: |
20 | 27 |
|
21 | 28 | ```bash |
22 | 29 | npm install |
| 30 | +``` |
| 31 | + |
| 32 | +Start the local dev server: |
| 33 | + |
| 34 | +```bash |
23 | 35 | npm run dev |
24 | 36 | ``` |
25 | 37 |
|
26 | | -For a production preview: |
| 38 | +Vite will print a local URL, usually: |
| 39 | + |
| 40 | +```text |
| 41 | +http://localhost:5173/ |
| 42 | +``` |
| 43 | + |
| 44 | +Build locally before pushing: |
27 | 45 |
|
28 | 46 | ```bash |
29 | 47 | npm run build |
| 48 | +``` |
| 49 | + |
| 50 | +Preview the production build: |
| 51 | + |
| 52 | +```bash |
30 | 53 | npm run preview |
31 | 54 | ``` |
32 | 55 |
|
33 | | -## Deployment |
| 56 | +## Common Workflow |
34 | 57 |
|
35 | | -GitHub Pages is deployed through GitHub Actions only. Configure Pages with "GitHub Actions" as the build and deployment source. |
| 58 | +```bash |
| 59 | +git switch style |
| 60 | +npm run dev |
| 61 | +npm run build |
| 62 | +git status |
| 63 | +git add . |
| 64 | +git commit -m "Describe the change" |
| 65 | +git push |
| 66 | +``` |
36 | 67 |
|
37 | | -The workflow at `.github/workflows/pages.yml` builds the Vite site and publishes the generated `dist/` artifact on pushes to `style`. Pull requests into `style` run build validation without deploying. |
| 68 | +After the push, check the deployment here: |
38 | 69 |
|
39 | | -## Domain |
| 70 | +[Deploy Static Site workflow](https://github.com/rgs2151/landing/actions/workflows/pages.yml) |
40 | 71 |
|
41 | | -Custom domain is configured via `CNAME`: |
| 72 | +## Important Files |
42 | 73 |
|
43 | | -```text |
44 | | -singha.io |
45 | | -``` |
| 74 | +- `index.html`: homepage content and metadata |
| 75 | +- `stylesheet.css`: site styling |
| 76 | +- `images/`: profile and project images |
| 77 | +- `404.html`: custom not-found page |
| 78 | +- `CNAME`: custom domain, `singha.io` |
| 79 | +- `.github/workflows/pages.yml`: GitHub Actions build and deploy workflow |
| 80 | +- `tools/copy-static.mjs`: copies static Pages files into `dist/` after Vite builds |
| 81 | +- `AGENTS.md`: instructions for coding agents working in this repo |
| 82 | + |
| 83 | +## Deployment Settings |
| 84 | + |
| 85 | +GitHub repository settings should be: |
| 86 | + |
| 87 | +- Default branch: `style` |
| 88 | +- Pages source: GitHub Actions |
| 89 | +- Custom domain: `singha.io` |
| 90 | +- Pages environment: allow deployments from `style` |
| 91 | + |
| 92 | +## Notes |
| 93 | + |
| 94 | +- This repo does not use Jekyll. |
| 95 | +- `node_modules/` and `dist/` are ignored. |
| 96 | +- Node is pinned in `.node-version`. |
| 97 | +- The production site is made by GitHub Actions, not by manually uploading local files. |
0 commit comments