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

CLI Deploy failing on CDN diff #29

Open
skylartaylor opened this issue May 5, 2020 · 3 comments
Open

CLI Deploy failing on CDN diff #29

skylartaylor opened this issue May 5, 2020 · 3 comments

Comments

@skylartaylor
Copy link

I am trying to build my site in Github Actions and deploy to Netlify using @netlify/actions and getting the following output:

   Warning: JSONHTTPError: Not Found 404
   Warning: 
   {
      "name": "JSONHTTPError",
      "status": 404,
      "json": {
        "code": 404,
        "message": "Not Found"
      }
   }
JSONHTTPError: Not Found
    at parseResponse (/usr/local/share/.config/yarn/global/node_modules/netlify/src/methods/response.js:12:11)
    at runMicrotasks (<anonymous>)
    at async callMethod (/usr/local/share/.config/yarn/global/node_modules/netlify/src/methods/index.js:38:26)
    at async module.exports (/usr/local/share/.config/yarn/global/node_modules/netlify/src/deploy/index.js:78:16)
    at async NetlifyAPI.deploy (/usr/local/share/.config/yarn/global/node_modules/netlify/src/index.js:93:12)
    at async DeployCommand.run (/usr/local/share/.config/yarn/global/node_modules/netlify-cli/src/commands/deploy.js:177:17)
    at async DeployCommand._run (/usr/local/share/.config/yarn/global/node_modules/@oclif/command/lib/command.js:43:20)
    at async Config.runCommand (/usr/local/share/.config/yarn/global/node_modules/@oclif/config/lib/config.js:172:9)
    at async Main.run (/usr/local/share/.config/yarn/global/node_modules/@oclif/command/lib/main.js:22:9)

Here's the YAML from my build config:

      - name: Deploy to Netlify
        uses: netlify/actions/cli@master
        env:
          NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
          NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }}
        with:
          args: deploy --dir=public --prod
          secrets: '["NETLIFY_AUTH_TOKEN", "NETLIFY_SITE_ID"]'

This is not able to be reproduced locally on my machine, where the deploy works fine.

@rutgerbakker95
Copy link

Same issue here

@rutgerbakker95
Copy link

@skylartaylor it works for me now. The issue in my workflow was that I forgot some environment variables to build my application:

    - name: 📁 Generate static site
      run: yarn generate
      env:
        BASE_URL: ${{ secrets.BASE_URL }}
        CTF_CDA_ACCESS_TOKEN: ${{ secrets.CTF_CDA_ACCESS_TOKEN }}
        CTF_ENVIRONMENT: ${{ secrets.CTF_ENVIRONMENT }}
        CTF_SPACE_ID: ${{ secrets.CTF_SPACE_ID }}
        ENVIRONMENT: ${{ secrets.ENVIRONMENT }}
    - name: 🌍 Publish to Netlify
      uses: netlify/actions/cli@master
      env:
        NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }}
        NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
      with:
        args: deploy --dir=dist --prod
        secrets: '["NETLIFY_AUTH_TOKEN", "NETLIFY_SITE_ID"]'

@skylartaylor
Copy link
Author

Interesting! My site is building just fine, it’s just the deploy to Netlify that is failing. I’ll poke at the build some more though!

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

2 participants