Skip to content

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.

chore: Revert "chore: add workflow_dispatch trigger to CLI R2 workflow (#5593)" (#5594)

Oleg Isonend1de1bb8fd58
diff --git a/.github/workflows/cli-r2.yaml b/.github/workflows/cli-r2.yaml
index 77728e8e6d..b8e3247cf0 100644
--- a/.github/workflows/cli-r2.yaml
+++ b/.github/workflows/cli-r2.yaml
@@ -1,12 +1,6 @@
name: CLI R2
on:
- workflow_dispatch:
- inputs:
- ref:
- description: "Branch or SHA to build"
- required: false
- default: "main"
push:
branches:
- "*.staging"
@@ -35,7 +29,7 @@ jobs:
steps:
- uses: actions/checkout@v4
with:
- ref: ${{ inputs.ref || github.sha }} # Use input ref for workflow_dispatch, or HEAD commit
+ ref: ${{ github.sha }} # HEAD commit instead of merge commit
# We need submodules here as this is used for the cloudflare build
- uses: ./.github/actions/submodules-checkout
@@ -75,23 +69,13 @@ jobs:
- name: Copy artifact
run: |
- # Get the actual SHA of the checked out commit
- ACTUAL_SHA=$(git rev-parse HEAD)
+ # For staging
+ aws s3 cp cloudflare-template.tar.zst "s3://${ARTEFACT_BUCKET_NAME}/public/cloudflare-template/${{ github.ref_name }}.tar.zst"
- # For staging/branch builds
- if [ -n "${{ github.ref_name }}" ] && [ "${{ github.ref_name }}" != "" ]; then
- aws s3 cp cloudflare-template.tar.zst "s3://${ARTEFACT_BUCKET_NAME}/public/cloudflare-template/${{ github.ref_name }}.tar.zst"
- fi
-
- # For production - use the actual SHA (can be cached forever)
+ # For production can be cached forever
aws s3 cp \
--metadata-directive REPLACE --cache-control "public,max-age=31536102,immutable" \
- cloudflare-template.tar.zst "s3://${ARTEFACT_BUCKET_NAME}/public/cloudflare-template/${ACTUAL_SHA}.tar.zst"
-
- # Also upload as "main" for workflow_dispatch on main branch
- if [ "${{ inputs.ref }}" = "main" ] || [ "${{ github.ref_name }}" = "main" ]; then
- aws s3 cp cloudflare-template.tar.zst "s3://${ARTEFACT_BUCKET_NAME}/public/cloudflare-template/main.tar.zst"
- fi
+ cloudflare-template.tar.zst "s3://${ARTEFACT_BUCKET_NAME}/public/cloudflare-template/${{ github.sha }}.tar.zst"
working-directory: ${{ github.workspace }}/..
env:
@@ -119,10 +103,7 @@ jobs:
node-version: 20
- name: Copy atrifact via http
- run: |
- # For workflow_dispatch, use the input ref; for push, use branch name
- ARTIFACT_REF="${{ inputs.ref || github.ref_name }}"
- curl -o cloudflare-template.tar.zst "${{ secrets.ARTEFACT_BUCKET_URL }}/public/cloudflare-template/${ARTIFACT_REF}.tar.zst"
+ run: curl -o cloudflare-template.tar.zst ${{ secrets.ARTEFACT_BUCKET_URL }}/public/cloudflare-template/${{ github.ref_name }}.tar.zst
- name: Extract archive
run: tar --use-compress-program="zstd -d" -xf cloudflare-template.tar.zst -C .
@@ -150,8 +131,6 @@ jobs:
delete-github-deployments:
needs: checks
- # Only delete deployments for branch pushes, not workflow_dispatch
- if: github.event_name == 'push'
uses: ./.github/workflows/delete-github-deployments.yml
with:
ref: ${{ github.ref_name }}