diff --git a/.github/links.yml b/.github/links.yml index edc1be619..135a1ebe6 100644 --- a/.github/links.yml +++ b/.github/links.yml @@ -11,7 +11,7 @@ jobs: website_url: - "https://labs.leaningtech.com" - "https://cheerp.io" - - "https://cheerpj.io" + - "https://cheerpj.com" - "https://cheerpx.io" runs-on: ubuntu-latest steps: diff --git a/.github/styles/Vocab/LeaningTechnologies/accept.txt b/.github/styles/config/vocabularies/LeaningTechnologies/accept.txt similarity index 100% rename from .github/styles/Vocab/LeaningTechnologies/accept.txt rename to .github/styles/config/vocabularies/LeaningTechnologies/accept.txt diff --git a/.github/styles/Vocab/LeaningTechnologies/deny.txt b/.github/styles/config/vocabularies/LeaningTechnologies/reject.txt similarity index 100% rename from .github/styles/Vocab/LeaningTechnologies/deny.txt rename to .github/styles/config/vocabularies/LeaningTechnologies/reject.txt diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index fbc5d52cf..5b710530c 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -4,7 +4,13 @@ on: push: branches: - main - - monorepo # TEMP + workflow_dispatch: + +# Not cancel-in-progress: rsync --delete mid-transfer leaves the remote +# docs tree half-updated. +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: false jobs: cheerpj: @@ -12,26 +18,24 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v4 + uses: actions/checkout@v7 - - uses: pnpm/action-setup@v4 - name: Install pnpm + - name: Install Node.js + uses: actions/setup-node@v7 with: - version: 10 - run_install: false + node-version-file: package.json - - name: Install Node.js - uses: actions/setup-node@v4 + - uses: pnpm/action-setup@v6 + name: Install pnpm with: - node-version: 20 - cache: "pnpm" + run_install: false - name: Get pnpm store directory shell: bash run: | echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV - - uses: actions/cache@v4 + - uses: actions/cache@v6 name: Setup pnpm cache with: path: ${{ env.STORE_PATH }} @@ -42,14 +46,11 @@ jobs: - name: Install dependencies run: cd sites/cheerpj && pnpm install --frozen-lockfile - - name: Build global-navbar - run: cd packages/global-navbar && pnpm run build - - name: Build sites/cheerpj run: cd sites/cheerpj && pnpm run build - name: Deploy cheerpj.com/docs - uses: burnett01/rsync-deployments@7.0.1 + uses: burnett01/rsync-deployments@v9 with: switches: -avzr --delete path: sites/cheerpj/dist/ @@ -58,17 +59,3 @@ jobs: remote_port: ${{ secrets.RSYNC_DEPLOY_PORT }} remote_user: ${{ secrets.RSYNC_DEPLOY_USER }} remote_key: ${{ secrets.RSYNC_DEPLOY_KEY }} - - - name: Copy global-navbar dist to WordPress plugin - run: cp -r packages/global-navbar/dist packages/global-navbar/wordpress-plugin/global-navbar - - - name: Deploy global-navbar WordPress plugin - uses: burnett01/rsync-deployments@7.0.1 - with: - switches: -avzr --delete - path: packages/global-navbar/wordpress-plugin/global-navbar/ - remote_path: ${{ secrets.RSYNC_DEPLOY_PATH_GLOBAL_NAVBAR }} - remote_host: ${{ secrets.RSYNC_DEPLOY_HOST }} - remote_port: ${{ secrets.RSYNC_DEPLOY_PORT }} - remote_user: ${{ secrets.RSYNC_DEPLOY_USER }} - remote_key: ${{ secrets.RSYNC_DEPLOY_KEY }} diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index d09450f23..598ec445c 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -2,25 +2,30 @@ name: Lint on: push: + branches: + - main pull_request: +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + jobs: astro: name: Astro runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v7 - name: Install Node.js - uses: actions/setup-node@v3 + uses: actions/setup-node@v7 with: - node-version: 20 + node-version-file: package.json - - uses: pnpm/action-setup@v2 + - uses: pnpm/action-setup@v6 name: Install pnpm with: - version: 10 run_install: false - name: Get pnpm store directory @@ -28,7 +33,7 @@ jobs: run: | echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV - - uses: actions/cache@v3 + - uses: actions/cache@v6 name: Setup pnpm cache with: path: ${{ env.STORE_PATH }} @@ -50,17 +55,16 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v7 - name: Install Node.js - uses: actions/setup-node@v3 + uses: actions/setup-node@v7 with: - node-version: 20 + node-version-file: package.json - - uses: pnpm/action-setup@v2 + - uses: pnpm/action-setup@v6 name: Install pnpm with: - version: 10 run_install: false - name: Get pnpm store directory @@ -68,7 +72,7 @@ jobs: run: | echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV - - uses: actions/cache@v3 + - uses: actions/cache@v6 name: Setup pnpm cache with: path: ${{ env.STORE_PATH }} @@ -85,10 +89,19 @@ jobs: prose_vale: name: Prose (Vale) runs-on: ubuntu-latest - # temporarily disabled because test is brittle: https://github.com/errata-ai/vale/issues/841 - if: github.event_name == 'pull_request' && false + if: github.event_name == 'pull_request' + + # Advisory: fail_on_error keeps prose findings from ever failing the job. + steps: - - uses: actions/checkout@v3 - - uses: errata-ai/vale-action@reviewdog + - uses: actions/checkout@v7 + + - uses: vale-cli/vale-action@v3 with: - version: 2.30.0 + version: 3.20.0 + fail_on_error: false + level: warning + filter_mode: added + reporter: github-pr-annotations + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.npmrc b/.npmrc deleted file mode 100644 index 92caccf54..000000000 --- a/.npmrc +++ /dev/null @@ -1,5 +0,0 @@ -# Prevent accidental lockfile modifications -frozen-lockfile=true - -# Auto-install peer dependencies -auto-install-peers=true diff --git a/.vale.ini b/.vale.ini index 858444191..c342fdaad 100644 --- a/.vale.ini +++ b/.vale.ini @@ -1,13 +1,19 @@ StylesPath = .github/styles Vocab = LeaningTechnologies -MinAlertLevel = suggestion - -Packages = Microsoft +MinAlertLevel = warning [formats] mdx = md -# TODO (https://github.com/errata-ai/vale/issues/841): proper mdx support for Vale [*.{md,mdx}] BasedOnStyles = Vale + +# Off: flagged 1400 ordinary tech terms as misspellings. Vale.Terms still +# enforces brand capitalisation, Vale.Avoid still blocks reject.txt. +Vale.Spelling = NO + +# Vale has no native MDX parser, so imports, URLs, code spans and filenames +# all reach it as prose. Regexes must be bare; wrapping them in () breaks them. +BlockIgnores = (?m)^import .*$ +TokenIgnores = https?://\S+, `[^`]+`, \S+\.(?:wasm|js|mjs|ts|json|astro|svelte|html|css|toml|yml) diff --git a/package.json b/package.json index 7cbf842c2..ac82755cc 100644 --- a/package.json +++ b/package.json @@ -2,6 +2,14 @@ "name": "labs", "version": "0.0.1", "private": true, + "packageManager": "pnpm@10.34.5", + "devEngines": { + "runtime": { + "name": "node", + "version": "22.23.2", + "onFail": "download" + } + }, "scripts": { "format": "prettier --write ." }, diff --git a/packages/astro-theme/components/nav/global/GlobalNavbar.astro b/packages/astro-theme/components/nav/global/GlobalNavbar.astro deleted file mode 100644 index 6afd14989..000000000 --- a/packages/astro-theme/components/nav/global/GlobalNavbar.astro +++ /dev/null @@ -1,7 +0,0 @@ ---- -import EventBanner from "./EventBanner.svelte"; -import Nav from "@leaningtech/global-navbar/Wrapper.astro"; ---- - - -