Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Example for using the action doesn't work #281

Open
svscorp opened this issue Aug 14, 2024 · 0 comments
Open

Example for using the action doesn't work #281

svscorp opened this issue Aug 14, 2024 · 0 comments

Comments

@svscorp
Copy link

svscorp commented Aug 14, 2024

Hi,

I am trying to deploy the code to my CF worker.

Tried (exactly as in the example):

jobs:
  deploy:
    runs-on: ubuntu-latest
    name: Deploy
    steps:
      - uses: actions/checkout@v4
      - name: Deploy app
        uses: cloudflare/wrangler-action@v3
        with:
          apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
jobs:
  deploy:
    runs-on: ubuntu-latest
    name: Deploy
    steps:
      - uses: actions/checkout@v4
      - name: Deploy app
        uses: cloudflare/wrangler-action@v3
        with:
          apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
          wranglerVersion: "2.20.0"
          comand: deploy

Neither works. It fails with error: Found argument 'deploy' which wasn't expected, or isn't valid in this context, regardless whether I add command: deploy or not.

Run cloudflare/wrangler-action@v3
  with:
    apiToken: ***
    quiet: false
🔍 Checking for existing Wrangler installation
  /usr/local/bin/npx --no-install wrangler --version
  npm error npx canceled due to missing packages and no YES option: ["[email protected][1](https://github.com/myrepo/actions/runs/10387836778/job/28762164196#step:4:1).0"]
  
  npm error A complete log of this run can be found in: /home/runner/.npm/_logs/[2](https://github.com/myrepo/actions/runs/10387836778/job/28762164196#step:4:2)024-08-14T12_46_50_808Z-debug-0.log
  ⚠️ Wrangler not found or version is incompatible. Installing...
📥 Installing Wrangler
  /usr/local/bin/npm i [email protected]
  npm warn deprecated @cloudflare/[email protected]: This package is for Wrangler v1.x and is no longer supported. Please visit https://www.npmjs.com/package/wrangler for Wrangler v2+.
  npm warn deprecated sourcemap-codec@1.[4](https://github.com/myrepo/actions/runs/10387836778/job/28762164196#step:4:4).8: Please use @jridgewell/sourcemap-codec instead
  npm warn deprecated [email protected]: This package has been deprecated and is no longer maintained. Please use @rollup/plugin-inject.
  
  added 8[6](https://github.com/myrepo/actions/runs/10387836778/job/28762164196#step:4:7) packages, and audited 87 packages in 11s
  
  10 packages are looking for funding
    run `npm fund` for details
  
  6 vulnerabilities (4 moderate, 1 high, 1 critical)
  
  To address issues that do not require attention, run:
    npm audit fix
  
  To address all issues (including breaking changes), run:
    npm audit fix --force
  
  Run `npm audit` for details.
  ✅ Wrangler installed
🚀 Running Wrangler Commands
  /usr/local/bin/npx wrangler deploy
  ⛔  DEPRECATED ⛔ 
  The version of Wrangler you are using is now deprecated.
  Please update to the latest version of wrangler to prevent critical errors.
  If originally installed via npm, run `npm uninstall -g @cloudflare/wrangler && npm install -g wrangler` to update to the latest version.
  If originally installed via cargo, run `cargo uninstall wrangler && npm install -g wrangler`
  Docs migration guide: https://developers.cloudflare.com/workers/wrangler/migration/migrating-from-wrangler-1/#update-wrangler-version
  error: Found argument 'deploy' which wasn't expected, or isn't valid in this context
  
  USAGE:
      wrangler [FLAGS] [OPTIONS] <SUBCOMMAND>
  
  For more information try --help
Error: The process '/usr/local/bin/npx' failed with exit code 1
Error: 🚨 Action failed
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

No branches or pull requests

1 participant