Skip to content

Commit 437dfef

Browse files
Merge pull request #26 from Keshav-writes-code/dev
introduce new CI/CD Stratergies and fixes for site deployment
2 parents 50b2508 + 857c24a commit 437dfef

10 files changed

Lines changed: 96 additions & 23 deletions

File tree

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
1-
name: 'tauri-build-debug'
1+
name: 'app-build-debug'
22

33
on:
4-
pull_request:
54
push:
65
branches:
7-
- main
86
- staging
9-
- main
7+
paths:
8+
- 'apps/app/**'
9+
- '.github/workflows/tauri-build-debug.yml'
10+
pull_request:
1011
paths:
1112
- 'apps/app/**'
1213
- '.github/workflows/tauri-build-debug.yml'
Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
1-
name: 'tauri-build-release'
1+
name: 'app-build-release'
22

33
on:
44
pull_request:
55
push:
66
branches:
77
- main
8-
- staging
98
paths:
109
- 'apps/app/**'
1110
- '.github/workflows/tauri-build-release.yml'
@@ -147,7 +146,7 @@ jobs:
147146
tagName: cherit-v__VERSION__ # the action automatically replaces \_\_VERSION\_\_ with the app version.
148147
releaseName: 'Cherit v__VERSION__'
149148
releaseAssetNamePattern: '[name]-[platform]-[arch][ext]'
150-
releaseBody: 'See the assets to download this version and install.'
149+
releaseBody: 'Download from Website : [Download](https://keshav.is-a.dev/Cherit/download/)'
151150
releaseDraft: true
152151
prerelease: false
153152
args: ${{ matrix.args }}

.github/workflows/site-check.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: 'site-build-check'
2+
3+
on:
4+
pull_request:
5+
paths:
6+
- 'apps/site/**'
7+
- '.github/workflows/site-check.yml'
8+
push:
9+
branches:
10+
- staging
11+
paths:
12+
- 'apps/site/**'
13+
- '.github/workflows/site-check.yml'
14+
workflow_dispatch:
15+
16+
jobs:
17+
check-site:
18+
runs-on: ubuntu-slim
19+
steps:
20+
- uses: actions/checkout@v4
21+
22+
- name: Setup Bun
23+
uses: oven-sh/setup-bun@v2
24+
25+
# Install dependencies at root (Monorepo context)
26+
- name: Install dependencies
27+
run: bun i
28+
29+
# Attempt to build the Astro site to ensure no errors
30+
- name: Install and Build Site
31+
working-directory: apps/site
32+
run: |
33+
bun install
34+
bun run build
Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Deploy to GitHub Pages
1+
name: 'site-deploy'
22

33
on:
44
push:
@@ -21,10 +21,7 @@ jobs:
2121
- name: Checkout your repository using git
2222
uses: actions/checkout@v5
2323

24-
- name: setup node
25-
uses: actions/setup-node@v4
26-
with:
27-
node-version: lts/*
24+
# Install dependencies at root (Monorepo context)
2825
- name: Setup Bun
2926
uses: oven-sh/setup-bun@v2
3027
- name: Install dependencies

apps/app/src/components/main_section/text_editor/index.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
{current_platform_type == 'mobile' && 'pt-22'}
4141
"
4242
>
43-
<div class="max-w-170 w-full font-sans" id="text_editor">
43+
<div class="max-w-180 w-full font-sans" id="text_editor">
4444
<input
4545
type="text"
4646
id="note_file_name_input"

apps/site/astro.config.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ export default defineConfig({
4343
}),
4444
mdx(),
4545
],
46-
site: "https://Keshav-writes-code.github.io",
46+
site: "https://keshav.is-a.dev/",
4747
base: "Cherit",
4848
devToolbar: {
4949
enabled: false,

apps/site/src/components/navbar/index.astro

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import logo from "@/assets/images/logo_500.png";
44
import InteractiveNav from "./interactive.svelte";
55
import { base } from "astro:config/client";
66
const links = {
7-
download: `${base}/download`,
7+
download: `${base}/downloads`,
88
demo: `${base}/demo`,
99
guides: `${base}/docs/guides/how_to_setup_syncing`,
1010
docs: `${base}/docs`,
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
---
2+
title: CI/CD Pipelines
3+
description: How we test, build, and release Cherit automatically.
4+
---
5+
6+
We use GitHub Actions to automate testing and releasing. Here is how our pipeline strategies work depending on the branch.
7+
8+
## 1. Pull Requests (Sanity Checks)
9+
10+
**Trigger:** Opening a PR to `main` or `staging`.
11+
12+
Before merging code, we ensure it compiles to prevent breaking the build.
13+
14+
- **App:** Runs a debug build on Linux/macOS/Windows/Android (both x86_64, arm) to verify Rust and Svelte compilation.
15+
- **Site:** Runs `bun run build` to ensure the Astro site builds without errors.
16+
17+
## 2. Staging Branch (Beta Testing)
18+
19+
**Trigger:** Pushing to `staging`.
20+
21+
This is our "Test Flight" zone.
22+
23+
- **App:** Builds **Debug** artifacts (unsigned) for all platforms. These are available in the GitHub Actions "Summary" tab for testers to download and try.
24+
- **Site:** Runs `bun run build` to ensure the Astro site builds without errors (same as PR check).
25+
26+
## 3. Main Branch (Production)
27+
28+
**Trigger:** Pushing to `main`.
29+
30+
This is the "Live" zone.
31+
32+
- **App Release:** Builds optimized **Release** binaries, signs them (Android/macOS), and creates a Draft Release on GitHub.
33+
- **Site Deploy:** Builds the documentation site and deploys it to GitHub Pages.
34+
35+
## Quick Reference
36+
37+
| Goal | Workflow File | Triggers |
38+
| :------------------ | :---------------------- | :----------- |
39+
| **Test App Logic** | `app-build-debug.yml` | PRs, Staging |
40+
| **Test Site Build** | `site-check.yml` | PRs, Staging |
41+
| **Release App** | `app-build-release.yml` | Main |
42+
| **Deploy Site** | `site-deploy.yml` | Main |

apps/site/src/content/docs/docs/index.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ hero:
99
file: ../../../assets/images/logo_500.png
1010
actions:
1111
- text: Get Started
12-
link: /cherit/docs/get-started
12+
link: /Cherit/docs/get-started
1313
icon: right-arrow
1414
variant: primary
1515
---
Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,18 +5,18 @@ import DownloadBtnHeadless from "@/components/common/download_button_headless.sv
55
import type { PageMetadata } from "@/types";
66
77
let metadata: PageMetadata = {
8-
title: "Home",
8+
title: "Downloads",
99
description:
10-
"Cherit is the 2MB note-taking powerhouse. Native performance on every platform. Markdown native, offline-first, and completely private. Just you and your thoughts.",
10+
"Get Cherit for Windows, macOS, Linux, and Android. A 2MB native powerhouse for offline-first, private Markdown note-taking with lightning speed.",
1111
open_graph: {
12-
title: "Cherit - Think Fast. Write Faster.",
12+
title: "Download Cherit - Native & Fast Markdown Notes",
1313
description:
14-
"Stop downloading entire web browsers just to write a grocery list. Cherit is a lightweight, local-first markdown editor.",
14+
"Stop downloading entire web browsers just to write a note. Get the 2MB, local-first markdown editor for all your devices.",
1515
},
1616
twitter: {
17-
title: "Cherit - The Lightweight Note-Taking App",
17+
title: "Download Cherit - The 2MB Note-Taking Powerhouse",
1818
description:
19-
"Native performance, 2MB size, Markdown support. Available on all platforms.",
19+
"Native performance on every platform. Markdown native, offline-first, and completely private.",
2020
},
2121
};
2222
type Platform = {
@@ -81,7 +81,7 @@ let platforms: Platform[] = [
8181
class="btn btn-primary btn-md lg:btn-lg xl:btn-xl group flex justify-center hover:scale-103 [transition-property:_scale,_background] duration-300"
8282
/>
8383
<div class="divider my-30">OR</div>
84-
<div class="tabs tabs-box gap-x-3 w-full justify-center bg-transparent">
84+
<div class="tabs tabs-box gap-x-3 gap-y-16 w-full justify-center bg-transparent">
8585
{ platforms.map(({label, icon, binaries}, i)=>(
8686
<label class="tab flex gap-2 py-3 px-5 h-max items-center capitalize ">
8787
<input type="radio" name="os_selector" checked={i==0} />

0 commit comments

Comments
 (0)