Skip to content

Conversation

@The-LukeZ
Copy link

@The-LukeZ The-LukeZ commented Nov 8, 2025

Updated instructions for setting up Cloudflare Workers deployment with GitHub Actions, including token management and workflow configuration.

The old workflow example was very likely going to fail because of missing nodejs and package manager setup - also if you didn't set your account_id in the wrangler.jsonc/toml.

The-LukeZ and others added 2 commits November 8, 2025 02:28
Updated instructions for setting up Cloudflare Workers deployment with GitHub Actions, including token management and workflow configuration.
@yusukebe
Copy link
Member

yusukebe commented Nov 9, 2025

Hi @The-LukeZ

Have you tried the current instruction? It works great for me. The repro: https://github.com/yusukebe/my-workers-github-actions-app

One thing we have to do is install Wrangler v4, since cloudflare/wrangler-action uses Wrangler v3.

name: Deploy

on:
  push:
    branches:
      - main

jobs:
  deploy:
    runs-on: ubuntu-latest
    name: Deploy
    steps:
      - uses: actions/checkout@v4
      - name: Install Wrangler v4 # <=== add
        run: npm install --save-dev wrangler@4 # <=== add
      - name: Deploy
        uses: cloudflare/wrangler-action@v3
        with:
          apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}

@The-LukeZ
Copy link
Author

The-LukeZ commented Nov 9, 2025

Yep, I did that. See yourself: https://github.com/The-LukeZ/upvote-engine

I don't know if you can see the action tab but the first workflow run used the exact example of the workflow.

@The-LukeZ
Copy link
Author

actually, my bad then - I copied the workflow and it was still v3 I think. I will try tomorrow if it works with just the wrangler v4.

@yusukebe
Copy link
Member

I think that the change of this PR is not necessary. Just using Wranlger v4 works.

@The-LukeZ
Copy link
Author

tbh I tried it and it didn't work.

What should I do exactly?

@yusukebe
Copy link
Member

@The-LukeZ

I think only the change in #778 is needed. We can use #778 instead of this PR.

@The-LukeZ
Copy link
Author

ah okay, thx 👍🏻

@The-LukeZ The-LukeZ closed this Nov 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants