cloudflare / cloudflare/wrangler-action

This GitHub Action takes 30s to run, it should be 10x faster

Open
#443 3 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
1.9k
Forks
214
PR merge metrics
No merged PRs in 30d

Description

Using this wrangler-action is unnecessarily slow and therefore consumes significant resources across the universe of people using it.

## Evidence

Here is my deploy script in GitHub Actions using this wrangler-action:

```yaml
# Deploy acls.net to Cloudflare Pages
deploy-acls-net:
name: Deploy acls.net
runs-on: ubuntu-latest
needs: [filter, build]
if: needs.filter.outputs.acls_net_changed == 'true' || needs.filter.outputs.shared_changed == 'true'
concurrency:
group: deploy-acls-net-${{ github.ref }}
cancel-in-progress: false
environment:
name: acls.net
url: ${{ steps.deploy.outputs.deployment-url }}
outputs:
preview-url: ${{ steps.deploy.outputs.deployment-url }}
steps:
- name: Download artifact
uses: actions/download-artifact@v8
with:
name: acls-net-build
path: build/

# NOTE: Cloudflare Pages deployments are atomic. The live production URL is only updated
# once the entire build is verified on their network. Interrupted builds do not affect the live site.
- name: Deploy to Cloudflare Pages
id: deploy
uses: cloudflare/wrangler-action@v4
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
command: pages deploy build/ --project-name=acls-net --branch=${{ github.head_ref || github.ref_name }}
```

Here is how much CI time this consumes just installing Wrangler before it actually uses it (pasted from a GitHub Action [run receipt](https://github.com/modern-training-solutions/public-websites/actions/runs/31202472475/job/92945887735)).

```yaml
Run cloudflare/wrangler-action@v4
🔍 Checking for existing Wrangler installation
📥 Installing Wrangler
/usr/local/bin/npm i wrangler@4

added 38 packages in 29s
... [ CLIPPED HERE ]
```

## Expectation

If you replace usage of this wrangler-action GitHub Action and instead use the GitHub's first-party supported [setup node](https://github.com/actions/setup-node) action, you can achieve 10x speed-up today.

## Recommendation

I recommend that Cloudflare study this technique and implement it themselves to achieve this 10x speed-up.

Contributor guide

Open the contributing guide

Research direction

Start with the wrangler-action@v4 execution path, especially the existing Wrangler check and the npm install step shown in the report. Compare it with the GitHub setup-node approach described in the issue and measure the installation time in a representative workflow. Done means the action avoids unnecessary installation overhead and demonstrates a materially faster run without changing deployment behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
github-actions, node.js, typescript
Domain
ci-cd, devops, performance
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.