Skip to content

Commit 323c888

Browse files
Merge pull request #29 from Keshav-writes-code/staging
Staging
2 parents 1459580 + e9fc745 commit 323c888

14 files changed

Lines changed: 214 additions & 125 deletions

File tree

.github/workflows/app-build-release.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@ name: 'app-build-release'
22

33
on:
44
pull_request:
5+
paths:
6+
- 'apps/app/**'
7+
- '.github/workflows/tauri-build-release.yml'
58
push:
69
branches:
710
- main
@@ -143,7 +146,7 @@ jobs:
143146
NDK_HOME: ${{ steps.setup-ndk.outputs.ndk-path }}
144147
with:
145148
projectPath: 'apps/app'
146-
tagName: cherit-v__VERSION__ # the action automatically replaces \_\_VERSION\_\_ with the app version.
149+
tagName: v__VERSION__ # the action automatically replaces \_\_VERSION\_\_ with the app version.
147150
releaseName: 'Cherit v__VERSION__'
148151
releaseAssetNamePattern: '[name]-[platform]-[arch][ext]'
149152
releaseBody: 'Download from Website : [Download](https://keshav.is-a.dev/Cherit/download/)'

.github/workflows/site-check.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,3 +32,12 @@ jobs:
3232
run: |
3333
bun install
3434
bun run build
35+
env:
36+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
37+
38+
- name: Upload Build Artifacts
39+
uses: actions/upload-artifact@v4
40+
with:
41+
name: site-build-output
42+
path: apps/site/dist
43+
retention-days: 5

.github/workflows/site-deploy.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@ jobs:
3131
uses: withastro/action@v5
3232
with:
3333
path: 'apps/site'
34+
env:
35+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3436

3537
deploy:
3638
needs: build

apps/site/src/components/home_page/section_1/index.astro

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import Screenshots from "./screenshots.astro";
1515
>
1616
<a
1717
href=`${base}/downloads`
18-
class="group inline-flex items-center gap-2 rounded-full border border-gray-200 bg-white/50 px-4 py-1.5 text-sm font-medium text-gray-600 backdrop-blur-sm transition-colors hover:bg-white hover:text-gray-900 dark:border-gray-800 dark:bg-gray-950/50 dark:text-gray-400 dark:hover:bg-gray-950 dark:hover:text-white shadow-sm hover:shadow-md"
18+
class="group inline-flex items-center gap-2 rounded-full border border-gray-200 bg-white/50 px-4 py-1.5 text-sm lt-sm:text-xs font-medium text-gray-600 backdrop-blur-sm transition-colors hover:bg-white hover:text-gray-900 dark:border-gray-800 dark:bg-gray-950/50 dark:text-gray-400 dark:hover:bg-gray-950 dark:hover:text-white shadow-sm hover:shadow-md"
1919
>
2020
<span class="relative flex h-2 w-2">
2121
<span
@@ -63,7 +63,7 @@ import Screenshots from "./screenshots.astro";
6363
the power of Markdown in a 3MB featherweight package
6464
</p>
6565
<div
66-
class="flex justify-center gap-6 items-start mt-12 *:w-min animate-in slide-in-b-4 fade-in-0 animate-duration-500 animate-fill-both animate-delay-300"
66+
class="flex lt-sm:flex-col justify-center items-center gap-6 lt-md:gap-4 items-start mt-12 *:w-min animate-in slide-in-b-4 fade-in-0 animate-duration-500 animate-fill-both animate-delay-300"
6767
>
6868
<DownloadBtnHeadless
6969
client:load

apps/site/src/components/home_page/section_2/index.astro

Lines changed: 2 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -66,55 +66,9 @@ let { class: classes } = Astro.props;
6666
</div>
6767
</section>
6868
<script>
69-
import { initScrollAnimation } from "@/utils/animate_on_scroll";
69+
import { initScrollAnimation } from "@/lib/animate_on_scroll";
7070

7171
document.addEventListener("DOMContentLoaded", () => {
72-
initScrollAnimation(".animate-on-scroll", ["visible"]);
72+
initScrollAnimation(".animate-on-scroll");
7373
});
7474
</script>
75-
<style>
76-
/* Custom Font */
77-
@import url("https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@300;400;500;600;700&display=swap");
78-
79-
body {
80-
font-family: "Space Grotesk", sans-serif;
81-
overflow-x: hidden;
82-
}
83-
84-
/* Icon Utility */
85-
.i-tabler {
86-
display: inline-block;
87-
vertical-align: middle;
88-
font-size: 1.5rem;
89-
}
90-
91-
html {
92-
scroll-behavior: smooth;
93-
}
94-
95-
/* Canvas */
96-
#hero-canvas {
97-
position: absolute;
98-
top: 0;
99-
left: 0;
100-
width: 100%;
101-
height: 100%;
102-
z-index: 0;
103-
pointer-events: none;
104-
}
105-
106-
/* Scrollbar */
107-
::-webkit-scrollbar {
108-
width: 8px;
109-
}
110-
::-webkit-scrollbar-track {
111-
background: #000;
112-
}
113-
::-webkit-scrollbar-thumb {
114-
background: #333;
115-
border-radius: 4px;
116-
}
117-
::-webkit-scrollbar-thumb:hover {
118-
background: #555;
119-
}
120-
</style>

apps/site/src/components/home_page/section_3/index.astro

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ let { class: classes } = Astro.props;
3636
</section>
3737

3838
<script>
39-
import { initScrollAnimation } from "@/utils/animate_on_scroll";
39+
import { initScrollAnimation } from "@/lib/animate_on_scroll";
4040
document.addEventListener("DOMContentLoaded", () => {
4141
initScrollAnimation();
4242
});

apps/site/src/components/home_page/section_4/index.astro

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ import { base } from "astro:config/client";
8181
</section>
8282

8383
<script>
84-
import { initScrollAnimation } from "@/utils/animate_on_scroll";
84+
import { initScrollAnimation } from "@/lib/animate_on_scroll";
8585
document.addEventListener("DOMContentLoaded", () => {
8686
initScrollAnimation();
8787
});

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

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,15 @@ import { Image } from "astro:assets";
33
import logo from "@/assets/images/logo_500.png";
44
import InteractiveNav from "./interactive.svelte";
55
import { base } from "astro:config/client";
6+
import { call_gh_api } from "@/lib/gh_api.ts";
67
const links = {
78
downloads: `${base}/downloads`,
89
demo: `${base}/demo`,
910
guides: `${base}/docs/guides/how_to_setup_syncing`,
1011
docs: `${base}/docs`,
1112
inspiration: `${base}/inspiration`,
1213
};
13-
const git_star_count = (
14-
await (
15-
await fetch("https://api.github.com/repos/Keshav-writes-code/Cherit")
16-
).json()
17-
).stargazers_count;
14+
const git_star_count = (await call_gh_api()).stargazers_count;
1815
---
1916

2017
<InteractiveNav nav_links={links} git_star_count={git_star_count} client:load>

apps/site/src/components/navbar/interactive.svelte

Lines changed: 35 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,14 @@
1515
1616
let y = $state(0);
1717
let expand_navbar_mobile = $state(false);
18+
let git_star_count_client_side = $state();
19+
(async () => {
20+
git_star_count_client_side = (
21+
await (
22+
await fetch("https://api.github.com/repos/Keshav-writes-code/Cherit")
23+
).json()
24+
).stargazers_count;
25+
})();
1826
</script>
1927

2028
<svelte:window bind:scrollY={y} />
@@ -51,7 +59,12 @@
5159
target="_blank"
5260
>
5361
<div class="i-mdi:github size-5.5"></div>
54-
{git_star_count}
62+
63+
{#if git_star_count_client_side}
64+
{git_star_count_client_side}
65+
{:else}
66+
{git_star_count}
67+
{/if}
5568
</a>
5669
</div>
5770
<div class="h-full md:hidden justify-self-end">
@@ -68,17 +81,36 @@
6881
</div>
6982
</div>
7083
{#if expand_navbar_mobile}
84+
{@const links_arr = Object.entries(nav_links)}
7185
<div class="w-full h-full" transition:slide>
7286
<nav class="flex flex-col gap-1 font-semibold">
7387
<ul class="menu menu-lg rounded-box w-full">
74-
{#each Object.entries(nav_links) as [key, value], i}
88+
{#each links_arr as [key, value], i}
7589
<li
76-
class="animate-in slide-in-b-2 fade-in-0 animate-duration-500 animate-fill-both {i}"
90+
class="animate-in slide-in-b-2 fade-in-0 animate-duration-500 animate-fill-both"
7791
style="animation-delay: {200 + 50 * i}ms;"
7892
>
7993
<a class="capitalize" href={value}>{key}</a>
8094
</li>
8195
{/each}
96+
<li
97+
class="mt-4 animate-in slide-in-b-2 fade-in-0 animate-duration-500 animate-fill-both"
98+
style="animation-delay: {200 + 50 * (links_arr.length + 2)}ms;"
99+
>
100+
<a
101+
href="https://github.com/Keshav-writes-code/Cherit"
102+
class="btn flex items-center"
103+
target="_blank"
104+
>
105+
<div class="i-mdi:github size-5.5"></div>
106+
107+
{#if git_star_count_client_side}
108+
{git_star_count_client_side}
109+
{:else}
110+
{git_star_count}
111+
{/if}
112+
</a>
113+
</li>
82114
</ul>
83115
</nav>
84116
</div>

apps/site/src/content/docs/docs/dev_docs/ci_pipelines.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,11 @@ This is our "Test Flight" zone.
2222

2323
- **App:** Builds **Debug** artifacts (unsigned) for all platforms. These are available in the GitHub Actions "Summary" tab for testers to download and try.
2424
- **Site:** Runs `bun run build` to ensure the Astro site builds without errors (same as PR check).
25+
- to test site builds
26+
- go to `Action Tab` > latest `site-build-check` run > `Summary` > download workflow artifact `site-build-output`
27+
- then extract the zip, move all content to a new dir called `Cherit`
28+
- then in the parent dir, run `bunx serve .`
29+
- open `http://localhost:3000/Cherit/` in browser to test
2530

2631
## 3. Main Branch (Production)
2732

0 commit comments

Comments
 (0)