Skip to content

Commit e00903f

Browse files
committed
Updated README.md + deployment
1 parent 91369f2 commit e00903f

2 files changed

Lines changed: 110 additions & 28 deletions

File tree

.github/workflows/deploy.yml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
name: Deploy to GitHub Pages
2+
3+
on:
4+
push:
5+
branches: [main, master]
6+
workflow_dispatch:
7+
8+
permissions:
9+
contents: write
10+
11+
concurrency:
12+
group: pages-deploy
13+
cancel-in-progress: true
14+
15+
jobs:
16+
build-and-deploy:
17+
runs-on: ubuntu-latest
18+
19+
steps:
20+
- name: Checkout
21+
uses: actions/checkout@v4
22+
23+
- name: Setup Node
24+
uses: actions/setup-node@v4
25+
with:
26+
node-version: '20'
27+
cache: 'npm'
28+
29+
- name: Install
30+
run: npm ci
31+
32+
- name: Test
33+
env:
34+
CI: true
35+
run: npm run test
36+
37+
- name: Build
38+
run: npm run build -- --configuration production --base-href /${{ github.event.repository.name }}/
39+
40+
- name: Deploy
41+
uses: peaceiris/actions-gh-pages@v4
42+
with:
43+
github_token: ${{ secrets.GITHUB_TOKEN }}
44+
publish_branch: gh-pages
45+
publish_dir: dist/kawaii-linktree/browser
46+
force_orphan: true

README.md

Lines changed: 64 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,59 +1,95 @@
1-
# KawaiiLinktree
1+
# 🌸 HazelTree
2+
[![Deploy to GitHub Pages](https://github.com/hazeliscoding/hazel-tree/actions/workflows/deploy.yml/badge.svg)](https://github.com/hazeliscoding/hazel-tree/actions/workflows/deploy.yml)
23

3-
This project was generated using [Angular CLI](https://github.com/angular/angular-cli) version 21.0.3.
4+
A cute, lightweight Linktree-style profile page built with Angular.
5+
Content is driven by a single JSON file so you can update links, labels, emojis, and profile info without touching the UI.
46

5-
## Development server
7+
> 💻 Platform: **Web** (Angular 21)
8+
>
9+
> ✨ Features: **light/dark theme**, **sparkle cursor**, **copy-to-clipboard links + toast**
610
7-
To start a local development server, run:
11+
---
812

9-
```bash
10-
ng serve
11-
```
13+
## 🛠 Tech Stack
14+
15+
- Angular 21 (standalone components + new control flow)
16+
- TypeScript
17+
- RxJS
18+
- Vitest (via `ng test`)
19+
- GitHub Pages deploy (`gh-pages`)
1220

13-
Once the server is running, open your browser and navigate to `http://localhost:4200/`. The application will automatically reload whenever you modify any of the source files.
21+
---
1422

15-
## Code scaffolding
23+
## 🚀 Running Locally
1624

17-
Angular CLI includes powerful code scaffolding tools. To generate a new component, run:
25+
From a terminal in the project root:
1826

1927
```bash
20-
ng generate component component-name
28+
# 1. Install deps
29+
npm install
30+
31+
# 2. Start dev server
32+
npm run start
2133
```
2234

23-
For a complete list of available schematics (such as `components`, `directives`, or `pipes`), run:
35+
Open `http://localhost:4200/`.
2436

25-
```bash
26-
ng generate --help
27-
```
37+
---
38+
39+
## 🧩 Customization (Your Links + Profile)
40+
41+
Edit your content in [public/assets/site-config.json](public/assets/site-config.json).
42+
43+
Supports:
2844

29-
## Building
45+
- `profile`: name, handle, bio, avatar
46+
- `links[]`: label, url, emoji, description
47+
- optional link extras:
48+
- `isNew: true` to show a “new” pill
49+
- `copyText` to copy text instead of navigating (shows a toast)
3050

31-
To build the project run:
51+
Notes:
52+
53+
- The app loads config from `assets/site-config.json` (relative), so it works correctly when deployed under a sub-path (GitHub Pages).
54+
- Put images under `public/assets/` and reference them like `assets/avatar.png`.
55+
56+
---
57+
58+
## 🏗 Building
3259

3360
```bash
34-
ng build
61+
npm run build
3562
```
3663

37-
This will compile your project and store the build artifacts in the `dist/` directory. By default, the production build optimizes your application for performance and speed.
64+
Build output goes to `dist/`.
3865

39-
## Running unit tests
66+
---
4067

41-
To execute unit tests with the [Vitest](https://vitest.dev/) test runner, use the following command:
68+
## 🧪 Tests
4269

4370
```bash
44-
ng test
71+
npm run test
4572
```
4673

47-
## Running end-to-end tests
74+
---
75+
76+
## 🌍 Deploying (GitHub Pages)
77+
78+
Deploys happen automatically via GitHub Actions on every push to `main` (or `master`).
79+
80+
The workflow builds with `--base-href /<repo-name>/` automatically (based on the GitHub repository name).
81+
82+
If you haven’t yet, enable GitHub Pages in your repo settings:
83+
84+
- **Settings → Pages → Build and deployment → Source:** `Deploy from a branch`
85+
- **Branch:** `gh-pages` (root)
4886

49-
For end-to-end (e2e) testing, run:
87+
This repo includes a deploy script that builds for production and publishes `dist/kawaii-linktree/browser` via `gh-pages`:
5088

5189
```bash
52-
ng e2e
90+
npm run deploy
5391
```
5492

55-
Angular CLI does not come with an end-to-end testing framework by default. You can choose one that suits your needs.
93+
If you’re deploying to a different repo name / sub-path and using the manual script, update the `--base-href` in the `deploy` script in [package.json](package.json).
5694

57-
## Additional Resources
5895

59-
For more information on using the Angular CLI, including detailed command references, visit the [Angular CLI Overview and Command Reference](https://angular.dev/tools/cli) page.

0 commit comments

Comments
 (0)