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
20 changes: 20 additions & 0 deletions .github/actions/cache-monorepo/action.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Cache Monorepo
description: Cache pnpm store and Nx cache for monorepo workflows
runs:
using: "composite"
steps:
- name: Cache pnpm store
uses: actions/cache@v4
with:
path: .pnpm-store
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-

- name: Cache Nx cache
uses: actions/cache@v4
with:
path: .nx/cache
key: ${{ runner.os }}-nx-cache-${{ github.sha }}
restore-keys: |
${{ runner.os }}-nx-cache-
14 changes: 11 additions & 3 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,18 @@ on:
pull_request:
branches: [ main ]

env:
HUSKY: 0

jobs:
build:
environment: test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Cache monorepo
uses: ./.github/actions/cache-monorepo

- name: Install pnpm
uses: pnpm/action-setup@v2
Expand All @@ -24,13 +29,16 @@ jobs:
with:
node-version-file: '.nvmrc'
cache: 'pnpm'


- name: Install dependencies
run: pnpm install

- name: Check
run: pnpm nx run-many --target=build,lint,test --parallel=3 --exclude="@storyblok/playground-*"
run: pnpm nx run-many --target=build,lint,test --parallel=3 -p="tag:npm:public"
env:
VITE_ACCESS_TOKEN: ${{ secrets.VITE_ACCESS_TOKEN }}
VITE_SPACE_ID: ${{ vars.VITE_SPACE_ID }}

- name: Check Licenses
run: pnpm nx exec -p="tag:npm:public" -- pnpm -w monoblok license check \$NX_PROJECT_NAME
10 changes: 7 additions & 3 deletions .github/workflows/pr-preview.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ on:
pull_request:
branches: [ main ]

env:
HUSKY: 0

jobs:
preview:
runs-on: ubuntu-latest
Expand All @@ -14,6 +17,9 @@ jobs:
steps:
- uses: actions/checkout@v4

- name: Cache monorepo
uses: ./.github/actions/cache-monorepo

- name: Install pnpm
uses: pnpm/action-setup@v2
with:
Expand All @@ -24,14 +30,12 @@ jobs:
with:
node-version-file: '.nvmrc'
cache: 'pnpm'
registry-url: 'https://npm.pkg.github.com'
scope: '@storyblok'

- name: Install dependencies
run: pnpm install

- name: Build
run: pnpm nx run-many --target=build --parallel=5 --exclude="@storyblok/playground-*"
run: pnpm nx run-many --target=build --parallel=5 -p="tag:npm:public"

- name: Generate PR version
id: pr-version
Expand Down
2 changes: 1 addition & 1 deletion lint-staged.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* @type {import('lint-staged').Configuration}
*/
export default {
'{packages,tools}/**/*.{js,ts,jsx,tsx,astro}': [
'{packages,tools}/**/*.{js,ts,jsx,tsx,astro,json}': [
(filenames) => `pnpm exec nx affected -t=lint --exclude="@storyblok/playground-*" --files=${filenames.join(',')} -- --fix`,
]
};
7 changes: 4 additions & 3 deletions packages/astro/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,7 @@
"test:e2e": "start-server-and-test playground:test http://localhost:4321/ cy:run",
"test:e2e-watch": "start-server-and-test playground:test http://localhost:4321/ cy:open",
"cy:run": "cypress run",
"cy:open": "cypress open",
"check-licenses": "node scripts/license-checker.mjs"
"cy:open": "cypress open"
},
"peerDependencies": {
"astro": "^3.0.0 || ^4.0.0 || ^5.0.0"
Expand All @@ -88,7 +87,6 @@
"eslint-config-prettier": "^10.0.1",
"eslint-plugin-astro": "^1.3.1",
"eslint-plugin-cypress": "^4.3.0",
"license-checker": "^25.0.1",
"prettier": "^3.4.2",
"prettier-plugin-astro": "^0.13.0",
"start-server-and-test": "^2.0.11",
Expand Down Expand Up @@ -145,6 +143,9 @@
"nx": {
"implicitDependencies": [
"!@storyblok/playground-*"
],
"tags": [
"type:lib"
]
}
}
1 change: 1 addition & 0 deletions packages/astro/playground/ssg/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"name": "@storyblok/playground-astro-ssg",
"version": "0.0.0",
"private": true,
"scripts": {
"dev": "astro dev",
"start": "astro dev",
Expand Down
1 change: 1 addition & 0 deletions packages/astro/playground/ssr/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"name": "@storyblok/playground-astro-ssr",
"version": "0.0.0",
"private": true,
"scripts": {
"dev": "astro dev",
"start": "astro dev",
Expand Down
1 change: 1 addition & 0 deletions packages/astro/playground/test/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"name": "@storyblok/playground-astro-test",
"version": "0.0.0",
"private": true,
"scripts": {
"dev": "astro dev",
"start": "astro dev",
Expand Down
54 changes: 0 additions & 54 deletions packages/astro/scripts/license-checker.mjs

This file was deleted.

4 changes: 1 addition & 3 deletions packages/js/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,7 @@
"lint": "eslint .",
"lint:fix": "eslint . --fix",
"cy:run": "cypress run",
"cy:open": "cypress open",
"check-licenses": "node scripts/license-checker.mjs"
"cy:open": "cypress open"
},
"dependencies": {
"@storyblok/richtext": "workspace:*",
Expand All @@ -56,7 +55,6 @@
"eslint-plugin-cypress": "^4.3.0",
"jsdom": "^26.0.0",
"kolorist": "^1.8.0",
"license-checker": "^25.0.1",
"pathe": "^2.0.3",
"start-server-and-test": "^2.0.11",
"typescript": "5.8.3",
Expand Down
1 change: 1 addition & 0 deletions packages/js/playground/vanilla/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"name": "@storyblok/playground-js-vanilla",
"version": "0.0.1",
"private": true,
"scripts": {
"dev": "vite",
"build": "vite build"
Expand Down
1 change: 1 addition & 0 deletions packages/js/playground/vue/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"name": "@storyblok/playground-js-vue",
"version": "0.0.0",
"private": true,
"scripts": {
"dev": "vite",
"build": "vite build"
Expand Down
54 changes: 0 additions & 54 deletions packages/js/scripts/license-checker.mjs

This file was deleted.

4 changes: 1 addition & 3 deletions packages/nuxt/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,7 @@
"pretest:e2e-static": "nuxi generate playground",
"test:e2e-static": "start-server-and-test dev:preview http://localhost:3000 cy:run",
"lint": "eslint .",
"lint:fix": "eslint . --fix",
"check-licenses": "node scripts/license-checker.mjs"
"lint:fix": "eslint . --fix"
},
"dependencies": {
"@storyblok/vue": "workspace:*"
Expand All @@ -60,7 +59,6 @@
"eslint-config-prettier": "^10.0.1",
"eslint-plugin-cypress": "^4.3.0",
"eslint-plugin-vue": "^9.32.0",
"license-checker": "^25.0.1",
"nuxt": "^3.15.4",
"prettier": "^3.4.2",
"start-server-and-test": "^2.0.11"
Expand Down
54 changes: 0 additions & 54 deletions packages/nuxt/scripts/license-checker.mjs

This file was deleted.

4 changes: 1 addition & 3 deletions packages/react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,7 @@
"playground:next13": "pnpm run --filter ./playground/next13 dev",
"playground:next13-app-router": "pnpm run --filter ./playground/next13-app-router dev",
"lint": "eslint .",
"lint:fix": "eslint . --fix",
"check-licenses": "node scripts/license-checker.mjs"
"lint:fix": "eslint . --fix"
},
"peerDependencies": {
"next": "^13 || ^14 || ^15",
Expand All @@ -75,7 +74,6 @@
"eslint": "^9.26.0",
"eslint-plugin-cypress": "^4.3.0",
"eslint-plugin-jest": "^28.11.0",
"license-checker": "^25.0.1",
"react": "^19.1.0",
"react-dom": "^19.1.0",
"rollup-plugin-preserve-directives": "^0.4.0",
Expand Down
1 change: 1 addition & 0 deletions packages/react/playground/react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"name": "@storyblok/playground-react-vite",
"type": "module",
"version": "0.0.1",
"private": true,
"scripts": {
"dev": "vite",
"build": "vite build"
Expand Down
Loading