n00b Q: can't get wrangler to do migrations using a github action, getting the following output: ```

n00b Q: can't get wrangler to do migrations using a github action, getting the following output:
  pnpx wrangler d1 migrations apply production --config=wrangler.toml
  shell: /usr/bin/bash -e {0}
  env:
    CLOUDFLARE_API_TOKEN: ***
    PNPM_HOME: /home/runner/setup-pnpm/node_modules/.bin
Progress: resolved 1, reused 0, downloaded 0, added 0
{truncated for brevity}
Error: Process completed with exit code 1.


if i run the same command in local it works, i also double checked the cloudflare api token has D1 READ & D1 EDIT permissions,

      - name: Migrate production
        working-directory: .
        run: pnpx wrangler d1 migrations apply production --config=wrangler.toml
        env:
          CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}


super open to any suggestions!!
Was this page helpful?