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

Deprecation warning about wrangler pages publish #88

Open
brycewray opened this issue May 30, 2023 · 5 comments
Open

Deprecation warning about wrangler pages publish #88

brycewray opened this issue May 30, 2023 · 5 comments

Comments

@brycewray
Copy link

brycewray commented May 30, 2023

When I run this action, it works but I get this error message in the log:

▲ [WARNING] `wrangler pages publish` is deprecated and will be removed in the next major version.

  Please use `wrangler pages deploy` instead, which accepts exactly the same arguments.

This is the relevant part of my overall workflow file:

      - name: Publish to CFP (cond. - host = CFP)
        if: ${{ env.HOST == 'CFP' }}
        uses: cloudflare/pages-action@v1
        with:
          apiToken: ${{ secrets.CFP_API_TOKEN }}
          accountID: ${{ secrets.CF_ACCOUNT_ID }}
          projectName: 'static-site-v2' # was 'static-site' (now 'static-site-old')
          directory: 'public'
          gitHubToken: ${{ secrets.GITHUB_TOKEN }}
          wranglerVersion: '3' # enable Wrangler v3

. . . although I was seeing this before I added the wranglerVersion line to the with section.

Does the deprecation warning mean I need to pass some additional args?

@rodbs
Copy link

rodbs commented Jun 28, 2023

I guess they need to update the action script according to the new wrangler parameters:
https://developers.cloudflare.com/workers/wrangler/commands/#publish-1

@WalshyDev
Copy link
Member

Yeah I intend to cut a v2 at some point soon which defaults wrangler to v3 and uses the correct command.
Deprecation is expected and fine for now. This command won't be removed until at least wrangler v4.

@smvz
Copy link

smvz commented Oct 1, 2023

I don't know whether or not the pull request #101 works as-is (I see that code is in two places and it only changes one) but a change of that nature would deal with the deprecation warning in a way that is non-breaking, so people using the v1 action with wrangler v3 aren't confused by it.

@rodrigoalcarazdelaosa
Copy link

I see that code is in two places and it only changes one

I only see it here. Where else is the pages publish referenced?

@smvz
Copy link

smvz commented Feb 5, 2024

I believe I was referring to here. I see now though that the .husky directory contains a pre-commit script to build index.js from src/index.ts, so it is just the one place.

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

5 participants