diff --git a/.github/actions/vercel/action.yaml b/.github/actions/vercel/action.yaml index 20077162acd1..b0582dfee716 100644 --- a/.github/actions/vercel/action.yaml +++ b/.github/actions/vercel/action.yaml @@ -76,7 +76,11 @@ runs: export GITHUB_SHA=${{ inputs.sha }} export GITHUB_REF_NAME=${{ inputs.ref-name }} - pnpx vercel build + if [ "${{ inputs.environment }}" = "production" ]; then + pnpx vercel build --prod + else + pnpx vercel build + fi shell: bash - name: Patch @@ -103,10 +107,19 @@ runs: - name: Deploy id: deploy run: | - pnpx vercel deploy \ - --prebuilt \ - --token ${{ inputs.vercel-token }} \ - 2> >(tee info.txt >&2) | tee domain.txt + if [ "${{ inputs.environment }}" = "production" ]; then + pnpx vercel deploy \ + --prebuilt \ + --prod \ + --skip-domain \ + --token ${{ inputs.vercel-token }} \ + 2> >(tee info.txt >&2) | tee domain.txt + else + pnpx vercel deploy \ + --prebuilt \ + --token ${{ inputs.vercel-token }} \ + 2> >(tee info.txt >&2) | tee domain.txt + fi echo "domain=$(cat ./domain.txt)" >> $GITHUB_OUTPUT echo "inspect-url=$(cat info.txt | grep 'Inspect:' | awk '{print $2}')" >> $GITHUB_OUTPUT @@ -114,6 +127,7 @@ runs: shell: bash - name: Set Alias + if: ${{ inputs.environment != 'production' }} id: alias run: | ALIAS="${{ steps.branch.outputs.value }}" diff --git a/.github/workflows/vercel-deploy-staging.yml b/.github/workflows/vercel-deploy-staging.yml index 883ccc710235..c55d9410927d 100644 --- a/.github/workflows/vercel-deploy-staging.yml +++ b/.github/workflows/vercel-deploy-staging.yml @@ -62,6 +62,18 @@ jobs: sha: ${{ github.sha }} environment: ${{ matrix.environment }} + - uses: ./.github/actions/vercel + if: matrix.environment == 'staging' + id: vercel-prod + name: Deploy to Vercel + with: + vercel-token: ${{ secrets.VERCEL_TOKEN }} + vercel-org-id: ${{ secrets.VERCEL_ORG_ID }} + vercel-project-id: ${{ secrets.VERCEL_PROJECT_ID }} + ref-name: ${{ github.ref_name }} + sha: ${{ github.sha }} + environment: "production" + - name: Debug Vercel Outputs run: | echo "domain=${{ steps.vercel.outputs.domain }}" @@ -74,6 +86,13 @@ jobs: description: "[${{ matrix.environment }}] Vercel logs" url: "${{ steps.vercel.outputs.inspect-url }}" + - uses: ./.github/actions/add-status + if: matrix.environment == 'staging' + with: + title: "⏰ [${{ matrix.environment }}] Vercel Production Inspection" + description: "[${{ matrix.environment }}] Vercel production logs" + url: "${{ steps.vercel-prod.outputs.inspect-url }}" + - uses: ./.github/actions/add-status with: title: "⭐ [${{ matrix.environment }}] Apps Webstudio URL" diff --git a/apps/builder/app/builder/shared/css-variable-utils.tsx b/apps/builder/app/builder/shared/css-variable-utils.tsx index c5dfbd41ae8f..4903a27fe3d0 100644 --- a/apps/builder/app/builder/shared/css-variable-utils.tsx +++ b/apps/builder/app/builder/shared/css-variable-utils.tsx @@ -598,17 +598,75 @@ export const RenameCssVariableDialog = ({ ); }; -export const DeleteUnusedCssVariablesDialog = () => { - const open = useStore($isDeleteUnusedCssVariablesDialogOpen); +const DeleteUnusedCssVariablesDialogContent = ({ + onClose, +}: { + onClose: () => void; +}) => { const unusedVariables = useStore($unusedCssVariables); + // Convert Set to Array for display + const unusedVariablesArray = Array.from(unusedVariables); + return ( + + {unusedVariablesArray.length === 0 ? ( + There are no unused CSS variables to delete. + ) : ( + <> + + Delete {unusedVariablesArray.length} unused CSS{" "} + {unusedVariablesArray.length === 1 ? "variable" : "variables"} from + the project? + + + {unusedVariablesArray.join(", ")} + + + )} + + {unusedVariablesArray.length > 0 && ( + + )} + + + + + + ); +}; + +export const DeleteUnusedCssVariablesDialog = () => { + const open = useStore($isDeleteUnusedCssVariablesDialogOpen); const handleClose = () => { $isDeleteUnusedCssVariablesDialogOpen.set(false); }; - // Convert Set to Array for display - const unusedVariablesArray = Array.from(unusedVariables); - return ( { }} > Delete unused CSS variables - - {unusedVariablesArray.length === 0 ? ( - There are no unused CSS variables to delete. - ) : ( - <> - - Delete {unusedVariablesArray.length} unused CSS{" "} - {unusedVariablesArray.length === 1 ? "variable" : "variables"}{" "} - from the project? - - - {unusedVariablesArray.join(", ")} - - - )} - - {unusedVariablesArray.length > 0 && ( - - )} - - - - - + ); diff --git a/packages/sdk-components-animation/private-src b/packages/sdk-components-animation/private-src index 8e802355e264..a5840a6ffa62 160000 --- a/packages/sdk-components-animation/private-src +++ b/packages/sdk-components-animation/private-src @@ -1 +1 @@ -Subproject commit 8e802355e264690386042c871d11f1f81d0df466 +Subproject commit a5840a6ffa624ee78daa7953b6cf94030aa099b1