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
feat: Report deployment url at *.prs.webstudio.is (#2590)
Ivan Starkov9c90a357cda9
diff --git a/.github/workflows/add-status.yml b/.github/workflows/add-status.ymlnew file mode 100644index 0000000000..d0fef9df5e--- /dev/null+++ b/.github/workflows/add-status.yml@@ -0,0 +1,42 @@+name: Add status to commit++on:+ push:+ branches:+ - main+ pull_request:++permissions:+ statuses: write # to fetch code (actions/checkout)++jobs:+ checks:+ timeout-minutes: 20++ env:+ DATABASE_URL: postgres://+ AUTH_SECRET: test++ runs-on: ubuntu-latest++ steps:+ - name: Add URL to vercel deployment through *.prs.webstudio.is+ uses: actions/github-script@v6+ with:+ script: |++ const branch = context.payload.ref ?? context.payload.pull_request.head.ref;+ const sha = context.payload.pull_request?.head?.sha ?? context.sha;++ const status = {+ state: 'success',+ target_url: `https://${branch.toLowerCase().replace(/[^a-z0-9-]+/g, '')}.prs.webstudio.is`,+ description: 'click details to see the deployment',+ context: '⭐ Apps Webstudio URL'+ };++ github.rest.repos.createCommitStatus({+ ...context.repo,+ sha,+ ...status+ });diff --git a/apps/builder/app/env/env.public.server.ts b/apps/builder/app/env/env.public.server.tsindex fbe8d92265..c117a625eb 100644--- a/apps/builder/app/env/env.public.server.ts+++ b/apps/builder/app/env/env.public.server.ts@@ -14,7 +14,6 @@ const env = {FEATURES: process.env.FEATURES,BUILDER_HOST: process.env.BUILDER_HOST,PUBLISHER_HOST: process.env.PUBLISHER_HOST || null,- BUILD_REQUIRE_SUBDOMAIN: process.env.BUILD_REQUIRE_SUBDOMAIN === "true",IMAGE_BASE_URL: serverEnv.IMAGE_BASE_URL,ASSET_BASE_URL: serverEnv.ASSET_BASE_URL,