Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions .github/workflows/app-build-debug-artifacts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,11 +58,7 @@ jobs:
- name: setup bun
uses: oven-sh/setup-bun@v2
- name: install frontend dependencies
if: matrix.platform != 'windows-11-arm'
run: bun i
- name: install frontend dependencies (Windows ARM)
if: matrix.platform == 'windows-11-arm'
run: npm install

# ------------- Rust -------------
- name: install Rust stable (desktop)
Expand Down
6 changes: 0 additions & 6 deletions .github/workflows/app-build-release-artifacts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,14 +64,8 @@ jobs:

# Case 1: Run bun for everything EXCEPT Windows ARM
- name: install frontend dependencies
if: matrix.platform != 'windows-11-arm'
run: bun i

# Case 2: Run npm ONLY for Windows ARM
- name: install frontend dependencies (Windows ARM)
if: matrix.platform == 'windows-11-arm'
run: npm install

# ------------- Rust & Cargo Cache -------------
- name: install Rust stable (desktop)
if: matrix.mobile == ''
Expand Down
6 changes: 0 additions & 6 deletions .github/workflows/app-build-release-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,14 +63,8 @@ jobs:

# Case 1: Run bun for everything EXCEPT Windows ARM
- name: install frontend dependencies
if: matrix.platform != 'windows-11-arm'
run: bun i

# Case 2: Run npm ONLY for Windows ARM
- name: install frontend dependencies (Windows ARM)
if: matrix.platform == 'windows-11-arm'
run: npm install

# ------------- Rust & Cargo Cache -------------
- name: install Rust stable (desktop)
if: matrix.mobile == ''
Expand Down
75 changes: 75 additions & 0 deletions .github/workflows/site-build-check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
name: 'site-build-check'

on:
pull_request:
branches: [staging, dev]
paths: ['apps/site-*/**', '.github/workflows/site-check.yml']

push:
branches: [staging]
paths: ['apps/site-*/**', '.github/workflows/site-check.yml']

workflow_dispatch:

jobs:
setup:
runs-on: ubuntu-slim
outputs:
apps: '${{ steps.set.outputs.apps }}'
steps:
- uses: actions/checkout@v5
- id: set
run: echo "apps=$(ls apps | grep '^site-' | jq -R -s -c 'split("\n")[:-1]')" >> $GITHUB_OUTPUT

build:
needs: setup
runs-on: ubuntu-slim
strategy:
matrix:
app: '${{ fromJson(needs.setup.outputs.apps) }}'
steps:
- uses: actions/checkout@v5

- uses: oven-sh/setup-bun@v2

- run: bun i

- name: Build
working-directory: apps/${{ matrix.app }}
run: |
bun run build
path=$(grep "base:" astro.config.mjs | sed -E "s/.*base:\s*['\"]Cherit\/?([^'\"]*)['\"].*/\1/" | tr -d /)
echo "$path" > ../../${{ matrix.app }}_path.txt
env:
GH_TOKEN: '${{ secrets.GITHUB_TOKEN }}'

- uses: actions/upload-artifact@v4
with:
name: ${{ matrix.app }}-dist
path: |
apps/${{ matrix.app }}/dist
${{ matrix.app }}_path.txt

merge:
needs: build
runs-on: ubuntu-slim
steps:
- uses: actions/download-artifact@v4
with:
path: artifacts
pattern: 'site-*-dist'

- name: Merge Artifacts
run: |
mkdir out
for d in artifacts/site-*-dist; do
A=$(basename "$d" -dist)
P=$(cat "$d/${A}_path.txt")
mkdir -p "out/$P"
cp -r "$d/apps/$A/dist/"* "out/$P/"
done

- uses: actions/upload-artifact@v4
with:
name: site-build-output
path: out
45 changes: 0 additions & 45 deletions .github/workflows/site-check.yml

This file was deleted.

43 changes: 27 additions & 16 deletions .github/workflows/site-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
push:
branches: [main]
paths:
- 'apps/site/**'
- 'apps/site-*/**'
- '.github/workflows/site-deploy.yml'

workflow_dispatch:
Expand All @@ -18,29 +18,40 @@ jobs:
build:
runs-on: ubuntu-slim
steps:
- name: Checkout your repository using git
uses: actions/checkout@v5
- uses: actions/checkout@v5

# Install dependencies at root (Monorepo context)
- name: Setup Bun
uses: oven-sh/setup-bun@v2
- name: Install dependencies
run: bun i
- uses: oven-sh/setup-bun@v2

- name: Install, build, and upload your site
uses: withastro/action@v5
with:
path: 'apps/site'
- run: bun i

- name: Build & Merge
run: |
mkdir out
for d in apps/site-*/; do
app=$(basename "$d")
echo "Building $app..."

cd "$d"
bun run build
path=$(grep "base:" astro.config.mjs | sed -E "s/.*base:\s*['\"]Cherit\/?([^'\"]*)['\"].*/\1/" | tr -d /)

mkdir -p "../../out/$path"
cp -r dist/* "../../out/$path/"
cd ../..
done
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GH_TOKEN: '${{ secrets.GITHUB_TOKEN }}'

- uses: actions/upload-pages-artifact@v3
with:
path: out

deploy:
needs: build
runs-on: ubuntu-slim
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
url: '${{ steps.deployment.outputs.page_url }}'
steps:
- name: Deploy to GitHub Pages
id: deployment
- id: deployment
uses: actions/deploy-pages@v4
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<div align="center">

<img src="apps/site/src/assets/images/logo_500.png" alt="Lokus" width="120" height="120" />
<img src="packages/shared-packages/images/logo_500.png" alt="Lokus" width="120" height="120" />

# Cherit

Expand Down
Loading
Loading