Skip to content
Closed
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
5 changes: 0 additions & 5 deletions .changeset/onrest-cancelled-before-first-frame.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/preserve-string-precision.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/reverse-transition-trail.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/stop-superseded-loop-chains.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/transition-phase-leave-render.md

This file was deleted.

23 changes: 23 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
.git
.github
.husky
.claude
.vercel
.vscode
.idea
.DS_Store

# build outputs and caches (rebuilt inside container)
**/node_modules
**/.turbo
**/build
**/dist
**/.cache
**/.react-router
**/__screenshots__
**/coverage
**/*.log

# editor / OS noise
*.tgz
Thumbs.db
109 changes: 109 additions & 0 deletions .github/workflows/docs-deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,109 @@
name: Docs deploy

on:
push:
branches: [next]
paths:
- 'docs/**'
- 'Dockerfile'
- '.dockerignore'
- '.github/workflows/docs-deploy.yml'
pull_request:
types: [opened, synchronize, reopened, closed]
workflow_dispatch:

permissions:
contents: read
pull-requests: write
id-token: write

env:
GCP_PROJECT_NUMBER: 204644970562
CLOUD_RUN_SERVICE: react-spring
CLOUD_RUN_REGION: europe-west1

jobs:
pr-changes:
if: github.event_name == 'pull_request' && github.event.action != 'closed'
runs-on: ubuntu-latest
outputs:
docs: ${{ steps.filter.outputs.docs }}
steps:
- uses: actions/checkout@v4
- uses: dorny/paths-filter@v3
id: filter
with:
filters: |
docs:
- 'docs/**'
- 'Dockerfile'
- '.dockerignore'
- '.github/workflows/docs-deploy.yml'

deploy-prod:
if: github.event_name == 'push' || github.event_name == 'workflow_dispatch'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: google-github-actions/auth@v2
with:
workload_identity_provider: ${{ secrets.WIF_PROVIDER }}
service_account: ${{ secrets.GCP_SA_EMAIL }}
- uses: google-github-actions/setup-gcloud@v2
- name: Deploy to Cloud Run (prod)
run: |
gcloud run deploy "$CLOUD_RUN_SERVICE" \
--source . \
--region "$CLOUD_RUN_REGION" \
--quiet

deploy-preview:
needs: pr-changes
if: |
github.event_name == 'pull_request' &&
github.event.action != 'closed' &&
needs.pr-changes.outputs.docs == 'true'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: google-github-actions/auth@v2
with:
workload_identity_provider: ${{ secrets.WIF_PROVIDER }}
service_account: ${{ secrets.GCP_SA_EMAIL }}
- uses: google-github-actions/setup-gcloud@v2
- name: Deploy preview revision
id: deploy
run: |
TAG="pr-${{ github.event.number }}"
gcloud run deploy "$CLOUD_RUN_SERVICE" \
--source . \
--region "$CLOUD_RUN_REGION" \
--tag "$TAG" \
--no-traffic \
--quiet
URL="https://${TAG}---${CLOUD_RUN_SERVICE}-${GCP_PROJECT_NUMBER}.${CLOUD_RUN_REGION}.run.app"
echo "url=$URL" >> "$GITHUB_OUTPUT"
- uses: marocchino/sticky-pull-request-comment@v2
with:
header: docs-preview
message: |
**Docs preview:** ${{ steps.deploy.outputs.url }}

Deployed at `${{ github.sha }}`. Updates on every push.

cleanup-preview:
if: github.event_name == 'pull_request' && github.event.action == 'closed'
runs-on: ubuntu-latest
steps:
- uses: google-github-actions/auth@v2
with:
workload_identity_provider: ${{ secrets.WIF_PROVIDER }}
service_account: ${{ secrets.GCP_SA_EMAIL }}
- uses: google-github-actions/setup-gcloud@v2
# tolerate failure: the PR may not have triggered a preview deploy
- name: Remove preview tag
run: |
gcloud run services update-traffic "$CLOUD_RUN_SERVICE" \
--region "$CLOUD_RUN_REGION" \
--remove-tags "pr-${{ github.event.number }}" \
--quiet || echo "No preview tag to remove"
32 changes: 32 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# syntax=docker/dockerfile:1.7

# ----- Build stage: install + build inside the full monorepo -----
FROM node:24-alpine AS builder

RUN corepack enable
WORKDIR /repo

COPY . .

RUN pnpm install --frozen-lockfile

# Build the docs and any workspace packages it depends on
RUN pnpm --filter @react-spring/docs... build

# Produce a self-contained dir with prod-only deps (symlinks dereferenced)
RUN pnpm --filter @react-spring/docs deploy --prod /out

# pnpm deploy doesn't carry over the build output; copy it in explicitly
RUN cp -r /repo/docs/build /out/build

# ----- Runtime stage: slim image with only what's needed to serve -----
FROM node:24-alpine

WORKDIR /app
ENV NODE_ENV=production
ENV PORT=8080

COPY --from=builder /out ./

EXPOSE 8080
CMD ["node_modules/.bin/react-router-serve", "./build/server/index.js"]
3 changes: 1 addition & 2 deletions docs/app/root.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import {
WidgetGoogleTagManagerBody,
} from './components/Widgets/WidgetGoogleTagManager'
import { lightThemeClass } from './styles/light-theme.css'
import global from './styles/global.css?url'
import './styles/global.css'
import docusearch from '@docsearch/css/dist/style.css?url'
import { getTheme, setTheme } from './helpers/theme.server'
import { darkThemeClass } from './styles/dark-theme.css'
Expand Down Expand Up @@ -62,7 +62,6 @@ export const meta: MetaFunction = () => {

export const links: LinksFunction = () => [
{ rel: 'stylesheet', href: docusearch },
{ rel: 'stylesheet', href: global },
{ rel: 'stylesheet', href: 'https://rsms.me/inter/inter.css' },
{ rel: 'preconnect', href: 'https://fonts.googleapis.com' },
{ rel: 'preconnect', href: 'https://fonts.gstatic.com' },
Expand Down
5 changes: 4 additions & 1 deletion docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,10 @@
"version": "2.0.0",
"private": true,
"type": "module",
"sideEffects": false,
"sideEffects": [
"**/*.css",
"**/*.css.ts"
],
"scripts": {
"build": "react-router build",
"dev": "concurrently \"pnpm dev:rr\" \"pnpm scripts:watch\"",
Expand Down
5 changes: 1 addition & 4 deletions docs/react-router.config.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
import { vercelPreset } from '@vercel/react-router/vite'
import type { Config } from '@react-router/dev/config'

export default {
presets: [vercelPreset()],
} satisfies Config
export default {} satisfies Config
2 changes: 1 addition & 1 deletion packages/animated/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@react-spring/animated",
"version": "10.0.4",
"version": "10.1.0",
"description": "Animated component props for React",
"module": "./dist/react-spring_animated.legacy-esm.js",
"main": "./dist/cjs/index.js",
Expand Down
2 changes: 1 addition & 1 deletion packages/core/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@react-spring/core",
"version": "10.0.4",
"version": "10.1.0",
"module": "./dist/react-spring_core.legacy-esm.js",
"main": "./dist/cjs/index.js",
"types": "./dist/react-spring_core.modern.d.mts",
Expand Down
2 changes: 1 addition & 1 deletion packages/mock-raf/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@react-spring/mock-raf",
"version": "10.0.4",
"version": "10.1.0",
"private": true,
"description": "Vendored copy of mock-raf for react-spring tests",
"license": "MIT",
Expand Down
2 changes: 1 addition & 1 deletion packages/parallax/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@react-spring/parallax",
"version": "10.0.4",
"version": "10.1.0",
"module": "./dist/react-spring_parallax.legacy-esm.js",
"main": "./dist/cjs/index.js",
"types": "./dist/react-spring_parallax.modern.d.mts",
Expand Down
2 changes: 1 addition & 1 deletion packages/rafz/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@react-spring/rafz",
"version": "10.0.4",
"version": "10.1.0",
"description": "react-spring's fork of rafz one frameloop to rule them all",
"module": "./dist/react-spring_rafz.legacy-esm.js",
"main": "./dist/cjs/index.js",
Expand Down
2 changes: 1 addition & 1 deletion packages/react-spring/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "react-spring",
"version": "10.0.3",
"version": "10.0.4",
"module": "./dist/react-spring.legacy-esm.js",
"main": "./dist/cjs/index.js",
"types": "./dist/react-spring.modern.d.mts",
Expand Down
2 changes: 1 addition & 1 deletion packages/shared/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@react-spring/shared",
"version": "10.0.4",
"version": "10.1.0",
"description": "Globals and shared modules",
"module": "./dist/react-spring_shared.legacy-esm.js",
"main": "./dist/cjs/index.js",
Expand Down
2 changes: 1 addition & 1 deletion packages/types/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@react-spring/types",
"version": "10.0.4",
"version": "10.1.0",
"description": "Internal package with TypeScript stuff",
"module": "./dist/react-spring_types.legacy-esm.js",
"main": "./dist/cjs/index.js",
Expand Down
2 changes: 1 addition & 1 deletion targets/konva/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@react-spring/konva",
"version": "10.0.4",
"version": "10.1.0",
"module": "./dist/react-spring_konva.legacy-esm.js",
"main": "./dist/cjs/index.js",
"types": "./dist/react-spring_konva.modern.d.mts",
Expand Down
2 changes: 1 addition & 1 deletion targets/native/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@react-spring/native",
"version": "10.0.4",
"version": "10.1.0",
"module": "./dist/react-spring_native.legacy-esm.js",
"main": "./dist/cjs/index.js",
"types": "./dist/react-spring_native.modern.d.mts",
Expand Down
2 changes: 1 addition & 1 deletion targets/three/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@react-spring/three",
"version": "10.0.4",
"version": "10.1.0",
"module": "./dist/react-spring_three.legacy-esm.js",
"main": "./dist/cjs/index.js",
"types": "./dist/react-spring_three.modern.d.mts",
Expand Down
2 changes: 1 addition & 1 deletion targets/web/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@react-spring/web",
"version": "10.0.4",
"version": "10.1.0",
"module": "./dist/react-spring_web.legacy-esm.js",
"main": "./dist/cjs/index.js",
"types": "./dist/react-spring_web.modern.d.mts",
Expand Down
2 changes: 1 addition & 1 deletion targets/zdog/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@react-spring/zdog",
"version": "10.0.4",
"version": "10.1.0",
"module": "./dist/react-spring_zdog.legacy-esm.js",
"main": "./dist/cjs/index.js",
"types": "./dist/react-spring_zdog.modern.d.mts",
Expand Down
Loading