Open source website builder and Webflow alternative. Webstudio is an advanced visual builder that connects to any headless CMS, supports all CSS properties, and can be hosted anywhere, including with us.
TypeScript accessibilityalternativecloudflarecloudflare-workersdesignfreefrontendopen-sourceradix-uireactremixweb-developmentwebflowwebsite-builderwebsite-developmentwebsiteswebstudio
ci: Restore safe-to-deploy workflows (#6054)
Oleg Isonen50958a68b324
diff --git a/.github/actions/add-status/action.yaml b/.github/actions/add-status/action.yamlindex b90e6986a9..be931299de 100644--- a/.github/actions/add-status/action.yaml+++ b/.github/actions/add-status/action.yaml@@ -15,7 +15,7 @@ runs:using: "composite"steps:- name: Add URL to vercel deployment through *.prs.webstudio.is- uses: actions/github-script@v7+ uses: actions/github-script@v8with:script: |const branch = context.payload.pull_request?.head?.ref ?? context.payload.ref?.replace('refs/heads/', '')diff --git a/.github/actions/ci-setup/action.yml b/.github/actions/ci-setup/action.ymlindex d07b350c89..5cb4f7558f 100644--- a/.github/actions/ci-setup/action.yml+++ b/.github/actions/ci-setup/action.yml@@ -12,8 +12,8 @@ runs:using: "composite"steps:- - uses: pnpm/action-setup@v4- - uses: actions/setup-node@v4+ - uses: pnpm/action-setup@v6+ - uses: actions/setup-node@v5with:node-version: 22cache: pnpmdiff --git a/.github/workflows/chromatic.yml b/.github/workflows/chromatic.ymlindex 279d387579..8a050895ee 100644--- a/.github/workflows/chromatic.yml+++ b/.github/workflows/chromatic.yml@@ -32,10 +32,11 @@ jobs:name: developmentsteps:- - uses: actions/checkout@v4+ - uses: actions/checkout@v5with:fetch-depth: 2 # we need to fetch at least parent commit to satisfy Chromaticref: ${{ github.event.pull_request.head.sha || github.sha }} # HEAD commit instead of merge commit+ allow-unsafe-pr-checkout: ${{ github.event_name == 'pull_request_target' && github.event.label.name == 'safe-to-deploy' }}# Storybook with submodules- uses: ./.github/actions/submodules-checkout@@ -46,7 +47,7 @@ jobs:- name: Chromaticid: chromatic- uses: chromaui/[email protected]+ uses: chromaui/action@v16with:projectToken: bea8dc1981d4buildScriptName: storybook:builddiff --git a/.github/workflows/delete-github-deployments.yml b/.github/workflows/delete-github-deployments.ymlindex 26860f2613..421438da96 100644--- a/.github/workflows/delete-github-deployments.yml+++ b/.github/workflows/delete-github-deployments.yml@@ -17,7 +17,7 @@ jobs:if: ${{ always() }}steps:- name: Delete Previous deployments- uses: actions/github-script@v7+ uses: actions/github-script@v8env:REF: ${{ inputs.ref }}with:diff --git a/.github/workflows/fixtures-test.yml b/.github/workflows/fixtures-test.ymlindex 87d3f29b84..b855621718 100644--- a/.github/workflows/fixtures-test.yml+++ b/.github/workflows/fixtures-test.yml@@ -35,7 +35,7 @@ jobs:BUILDER_HOST: ${{ inputs.builder-host }}steps:- - uses: actions/checkout@v4+ - uses: actions/checkout@v5with:ref: ${{ github.event.pull_request.head.sha || github.sha }}# Test that everything is working with submodulesdiff --git a/.github/workflows/main.yml b/.github/workflows/main.ymlindex c337503a17..83784fe273 100644--- a/.github/workflows/main.yml+++ b/.github/workflows/main.yml@@ -42,18 +42,19 @@ jobs:runs-on: ubuntu-24.04-armsteps:- - uses: actions/checkout@v4+ - uses: actions/checkout@v5with:ref: ${{ github.event.pull_request.head.sha || github.sha }}+ allow-unsafe-pr-checkout: ${{ github.event_name == 'pull_request_target' && github.event.label.name == 'safe-to-deploy' }}# Will not checkout submodules on empty environment, and will on development- uses: ./.github/actions/submodules-checkoutwith:submodules-ssh-key: ${{ secrets.PRIVATE_GITHUB_DEPLOY_TOKEN }}- - uses: pnpm/action-setup@v4+ - uses: pnpm/action-setup@v6- - uses: actions/setup-node@v4+ - uses: actions/setup-node@v5with:node-version: 22cache: pnpm@@ -84,7 +85,7 @@ jobs:pnpm check:generated-docs- name: Cache Playwright browsers- uses: actions/cache@v4+ uses: actions/cache@v5with:path: ~/.cache/ms-playwrightkey: playwright-${{ runner.os }}-${{ hashFiles('**/package-lock.json') }}@@ -105,15 +106,22 @@ jobs:pnpm -r typecheckcheck-size:+ # Run on push, regular PR (for repo branches), or labeled PR with safe-to-deploy (for forks)+ if: |+ github.event_name == 'push' ||+ github.event_name == 'pull_request' ||+ (github.event_name == 'pull_request_target' && github.event.label.name == 'safe-to-deploy')+runs-on: ubuntu-24.04-armenvironment:name: developmentsteps:- - uses: actions/checkout@v4+ - uses: actions/checkout@v5with:ref: ${{ github.event.pull_request.head.sha || github.sha }}+ allow-unsafe-pr-checkout: ${{ github.event_name == 'pull_request_target' && github.event.label.name == 'safe-to-deploy' }}- uses: ./.github/actions/submodules-checkoutwith:@@ -123,7 +131,7 @@ jobs:- run: pnpm --filter "{./fixtures/*}..." build- - uses: actions/github-script@v7+ - uses: actions/github-script@v8with:script: |const assertSize = async (directory, maxSize) => {@@ -181,9 +189,10 @@ jobs:shards: ${{ steps.shards.outputs.value }}steps:- - uses: actions/checkout@v4+ - uses: actions/checkout@v5with:ref: ${{ github.event.pull_request.head.sha || github.sha }}+ allow-unsafe-pr-checkout: ${{ github.event_name == 'pull_request_target' && github.event.label.name == 'safe-to-deploy' }}- uses: ./.github/actions/submodules-checkoutwith:@@ -206,10 +215,10 @@ jobs:run: pnpm e2e:builder:refresh-schema-cache- name: Upload builder e2e prerequisites- uses: actions/upload-artifact@v4+ uses: actions/upload-artifact@v6with:name: builder-e2e-build- retention-days: 1+ retention-days: 7path: |apps/builder/build/serverapps/builder/build/client/assets@@ -241,9 +250,10 @@ jobs:BUILDER_E2E_COMPOSE_ARGS: "--env-file apps/builder/.env -f apps/builder/docker-compose.yaml -f apps/builder/docker-compose.e2e.yaml"steps:- - uses: actions/checkout@v4+ - uses: actions/checkout@v5with:ref: ${{ github.event.pull_request.head.sha || github.sha }}+ allow-unsafe-pr-checkout: ${{ github.event_name == 'pull_request_target' && github.event.label.name == 'safe-to-deploy' }}- uses: ./.github/actions/submodules-checkoutwith:@@ -254,13 +264,13 @@ jobs:run-scripts: "true"- name: Cache Playwright browsers- uses: actions/cache@v4+ uses: actions/cache@v5with:path: ~/.cache/ms-playwrightkey: builder-e2e-playwright-${{ runner.os }}-${{ hashFiles('apps/builder/package.json', 'pnpm-lock.yaml') }}- name: Download builder e2e build- uses: actions/download-artifact@v4+ uses: actions/download-artifact@v7with:name: builder-e2e-buildpath: .diff --git a/.github/workflows/vercel-deploy-staging.yml b/.github/workflows/vercel-deploy-staging.ymlindex 69e4b8f534..84852255a4 100644--- a/.github/workflows/vercel-deploy-staging.yml+++ b/.github/workflows/vercel-deploy-staging.yml@@ -23,7 +23,7 @@ jobs:runs-on: ubuntu-lateststeps:- name: Remove safe-to-deploy label- uses: actions/github-script@v7+ uses: actions/github-script@v8with:script: |await github.rest.issues.removeLabel({@@ -61,17 +61,18 @@ jobs:runs-on: ubuntu-lateststeps:- - uses: actions/checkout@v4+ - uses: actions/checkout@v5with:ref: ${{ github.event_name == 'pull_request_target' && github.event.pull_request.head.sha || github.sha }}+ allow-unsafe-pr-checkout: ${{ github.event_name == 'pull_request_target' && github.event.action == 'labeled' && github.event.label.name == 'safe-to-deploy' }}- uses: ./.github/actions/submodules-checkoutwith:submodules-ssh-key: ${{ secrets.PRIVATE_GITHUB_DEPLOY_TOKEN }}- - uses: pnpm/action-setup@v4+ - uses: pnpm/action-setup@v6- - uses: actions/setup-node@v4+ - uses: actions/setup-node@v5with:node-version: 22cache: pnpm@@ -109,7 +110,7 @@ jobs:- name: Comment on PR with deployment URLif: github.event_name == 'pull_request_target' && matrix.environment == 'development'- uses: actions/github-script@v7+ uses: actions/github-script@v8with:script: |const deployUrl = 'https://${{ steps.vercel.outputs.alias }}.${{ matrix.environment }}.webstudio.is';@@ -124,13 +125,19 @@ jobs:builder-host: "${{ steps.vercel.outputs.alias }}.${{ matrix.environment }}.webstudio.is"deployment-host:+ # Run on push (for repo branches) OR on labeled event with safe-to-deploy label (for fork PRs)+ if: |+ github.event_name == 'push' ||+ (github.event_name == 'pull_request_target' && github.event.action == 'labeled' && github.event.label.name == 'safe-to-deploy')+runs-on: ubuntu-latestoutputs:development-builder-host: ${{ steps.host.outputs.value }}steps:- - uses: actions/checkout@v4+ - uses: actions/checkout@v5with:ref: ${{ github.event_name == 'pull_request_target' && github.event.pull_request.head.sha || github.sha }}+ allow-unsafe-pr-checkout: ${{ github.event_name == 'pull_request_target' && github.event.action == 'labeled' && github.event.label.name == 'safe-to-deploy' }}- id: hostshell: bashdiff --git a/.github/workflows/vis-reg-tests.yml b/.github/workflows/vis-reg-tests.ymlindex db45a8d9c3..11e28346c6 100644--- a/.github/workflows/vis-reg-tests.yml+++ b/.github/workflows/vis-reg-tests.yml@@ -38,6 +38,7 @@ jobs:- uses: actions/checkout@v4with:ref: ${{ github.event.pull_request.head.sha || github.sha }} # HEAD commit instead of merge commit+ allow-unsafe-pr-checkout: ${{ github.event_name == 'pull_request_target' && github.event.label.name == 'safe-to-deploy' }}- uses: ./.github/actions/ci-setup