Skip to content

Commit

Permalink
Multi-site monorepo (#91)
Browse files Browse the repository at this point in the history
  • Loading branch information
bates64 authored Jul 22, 2024
1 parent 18f1fb7 commit 6806c78
Show file tree
Hide file tree
Showing 624 changed files with 4,219 additions and 2,784 deletions.
25 changes: 25 additions & 0 deletions .github/links.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Links
on:
workflow_dispatch:
schedule:
# * is a special character in YAML so you have to quote this string
- cron: "0 4 * * *"
jobs:
crawl_for_broken_links:
strategy:
matrix:
website_url:
- "https://labs.leaningtech.com"
- "https://cheerp.io"
- "https://cheerpj.io"
- "https://cheerpx.io"
runs-on: ubuntu-latest
steps:
- name: Check links
uses: ScholliYT/Broken-Links-Crawler-Action@v3
with:
website_url: ${{ matrix.website_url }}
exclude_url_prefix: "mailto:,https://www.linkedin.com,https://linkedin.com,https://twitter.com"
verbose: "true"
max_retry_time: 30
max_retries: 5
55 changes: 46 additions & 9 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,54 @@ on:
push:
branches:
- main
- monorepo # TEMP

jobs:
purge_cache:
name: Purge Cloudflare cache
cheerpj:
name: cheerpj.com/docs
runs-on: ubuntu-latest
steps:
- name: Sleep to allow Pages to build
run: sleep 60
- name: Purge cache
- name: Checkout
uses: actions/checkout@v4

- uses: pnpm/action-setup@v4
name: Install pnpm
with:
version: 8
run_install: false

- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: 20
cache: "pnpm"

- name: Get pnpm store directory
shell: bash
run: |
curl --request POST \
--url https://api.cloudflare.com/client/v4/zones/2ab0c67ef74c8cb12474c3f7d76b1ac1/purge_cache \
--header 'Authorization: Bearer ${{ secrets.CLOUDFLARE_API_TOKEN }}' \
--data '{ "purge_everything": true }'
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
- uses: actions/cache@v4
name: Setup pnpm cache
with:
path: ${{ env.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: Install dependencies
run: cd sites/cheerpj && pnpm install

- name: Build sites/cheerpj
run: cd sites/cheerpj && pnpm run build

- name: Deploy
uses: burnett01/rsync-deployments@7.0.1
with:
switches: -avzr --delete
path: sites/cheerpj/dist/
remote_path: ${{ secrets.RSYNC_DEPLOY_PATH }}
remote_host: ${{ secrets.RSYNC_DEPLOY_HOST }}
remote_port: ${{ secrets.RSYNC_DEPLOY_PORT }}
remote_user: ${{ secrets.RSYNC_DEPLOY_USER }}
remote_key: ${{ secrets.RSYNC_DEPLOY_KEY }}
103 changes: 4 additions & 99 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,104 +5,9 @@ on:
pull_request:

jobs:
links:
name: Broken links
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Install Node.js
uses: actions/setup-node@v3
with:
node-version: 20

- uses: pnpm/action-setup@v2
name: Install pnpm
with:
version: 8
run_install: false

- name: Get pnpm store directory
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
- uses: actions/cache@v3
name: Setup pnpm cache
with:
path: ${{ env.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: Restore lychee cache
uses: actions/cache@v3
with:
path: .lycheecache
key: cache-lychee-${{ github.sha }}
restore-keys: cache-lychee-

- name: Install dependencies
run: pnpm install

- name: Build site
run: pnpm build

- name: Serve site in background
uses: JarvusInnovations/background-action@v1
with:
run: pnpm preview --host 0.0.0.0
wait-on: http://127.0.0.1:4321

- name: Install lychee
run: curl -L https://github.com/lycheeverse/lychee/releases/download/v0.13.0/lychee-v0.13.0-x86_64-unknown-linux-gnu.tar.gz | tar -xz

- name: Run lychee on sitemap
run: cat dist/sitemap-0.xml | grep -Eo "<loc>[^<]+" | sed "s/<loc>//" | sed "s/https/http/" | sed "s/labs.leaningtech.com/127.0.0.1:4321/" | sed "s/rss.xml//" | xargs ./lychee --cache --no-progress
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}

astro:
name: Astro
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Install Node.js
uses: actions/setup-node@v3
with:
node-version: 20

- uses: pnpm/action-setup@v2
name: Install pnpm
with:
version: 8
run_install: false

- name: Get pnpm store directory
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
- uses: actions/cache@v3
name: Setup pnpm cache
with:
path: ${{ env.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: Install dependencies
run: pnpm install

- name: Run astro check
run: pnpm astro check

typescript:
name: TypeScript
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
Expand Down Expand Up @@ -135,10 +40,10 @@ jobs:
run: pnpm install

- name: Generate Astro type declarations
run: pnpm astro sync
run: pnpm -r astro sync

- name: Run tsc
run: pnpm tsc
- name: Run astro check
run: pnpm -r astro check

prettier:
name: Prettier
Expand Down Expand Up @@ -175,7 +80,7 @@ jobs:
run: pnpm install

- name: Run Prettier
run: pnpm prettier --check . src/**/*.*
run: pnpm prettier --check .

prose_vale:
name: Prose (Vale)
Expand Down
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,7 @@ pnpm-debug.log*

# macOS-specific files
.DS_Store

# content dir copied from astro-theme
sites/*/src/content/blog
sites/*/src/content/blogauthors
110 changes: 0 additions & 110 deletions astro.config.mjs

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ tags:
- CheerpJ
---

import Callout from "@/components/Callout.astro";
import Callout from "@leaningtech/astro-theme/components/Callout.astro";

<Callout title="CheerpJ 3.0 now available" variant="important">
CheerpJ 3.0 has been released. Read the [release
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,8 @@ title: "Adding AddressSanitizer support to the Cheerp WebAssembly compiler"
description: |
Cheerp is a powerful C/C++ to JavaScript/WASM compiler.
pubDate: "2024-02-13"
categories:
- "technical-blog"
- "cheerp"
tags:
- Cheerp
authors:
- daan
heroImage: ./cheerp-asan.png
Expand Down
File renamed without changes
File renamed without changes.
File renamed without changes
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ authors: ["chen"]
heroImage: ./cheerp-typescript.png
---

import ThreeDemo from "@/components/ThreeDemo.svelte";
import ThreeDemo from "@leaningtech/cheerp-ts-three-demo";

The latest nightly build of Cheerp includes powerful integration with
[TypeScript](https://www.typescriptlang.org/), a popular programming language
Expand Down
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ tags:

CheerpJ is a **WebAssembly-based JVM that runs fully client side** in the browser. It supports Java applications, legacy applets and libraries, with no need for compilation, server backends, plugins, or post-processing steps.

import LinkButton from "@/components/LinkButton.astro";
import LinkButton from "@leaningtech/astro-theme/components/LinkButton.astro";
import { DISCORD_URL } from "@/consts.ts";

<div class="flex items-center gap-2 flex-wrap">
Expand Down
File renamed without changes
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ tags:
- CheerpJ
---

import LinkButton from "@/components/LinkButton.astro";
import LinkButton from "@leaningtech/astro-theme/components/LinkButton.astro";
import { DISCORD_URL } from "@/consts.ts";

CheerpJ 3.0, **a state-of-the-art WebAssembly JVM that runs in the browser**, is
Expand Down Expand Up @@ -49,8 +49,6 @@ We believe that this release brings a new era for deploying large scale Java app

CheerpJ is a full WebAssembly-based JVM replacement for the browser, and comes with a complete OpenJDK runtime. Thanks to multiple architectural innovations CheerpJ is now an extremely powerful tool, designed to work at the scale of real-world Enterprise applications.

![](../docs/cheerpj3/explanation-diagram.png)

### Features

CheerpJ's main capabilities are:
Expand Down
File renamed without changes
Loading

0 comments on commit 6806c78

Please sign in to comment.