question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

deploy to netlify using github actions

See original GitHub issue

Describe the bug

While fetching the data from the github repo, it is working good, but if i make my own github action with all required information, it is not building nuxt3 dist folder.

As per nuxt3 netlify docs: https://v3.nuxtjs.org/guide/deployment/netlify

It is not detecting the netlify environment while building.

Steps to reproduce

  1. Run git clone https://github.com/anburocky3/iragugal-web
  2. Check the github actions: .github/workflows/netlify.yaml & netlify.toml file
  3. Try to push it and the action fails with this error message.

image

Configuration

[dev]
  command = "sleep 999999999"
  framework = "#custom"
  functions = ".output/server"
  port = 8888
  targetPort = 3000

[build]
  command = "yarn build"
  publish = "dist/"
  functions = ".output/server"

[[redirects]]
  from = "/*"
  to = "/.netlify/functions/index"
  status = 200

Environment

  System:
    OS: Windows 10 10.0.22598
    CPU: (32) x64 AMD Ryzen 9 3950X 16-Core Processor
    Memory: 20.23 GB / 31.92 GB
  Binaries:
    Node: 16.14.2 - S:\laragon\bin\nodejs\node-v16.14.2-win-x64\node.EXE
    Yarn: 3.2.0 - S:\laragon\bin\nodejs\node-v16.14.2-win-x64\yarn.CMD
    npm: 8.5.0 - S:\laragon\bin\nodejs\node-v16.14.2-win-x64\npm.CMD
  npmPackages:
    netlify-cli: ^10.0.0 => 10.0.0

Have created this issue with nitro-deploys: https://github.com/unjs/nitro-deploys/issues/9 (Feel free to close, if it is repetative)

Issue Analytics

  • State:open
  • Created a year ago
  • Comments:10 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
mkluehcommented, May 8, 2022

Hi @anburocky3. It is strange why you are using Github actions to deploy netlify? Preset is designed to work with their CI/CD.

@pi0 Just found this thread and your post and I might have an issue that is related.

I’m using NX to build and deploy multiple sites out of one monorepo, using the Netlify CLI and the Netlify Edge preset, but strangely all I’m getting after the deployment is 404 errors.

I’ve tried multiple directories in the deploy command inside my application’s subdirectory:

  1. None
  2. “.”
  3. “.output”
  4. “.output/public”

The last one is the only one not leading to 404, but then everything that is related to functions is obviously missing.

Reading your comment, I’m wondering if the preset stuff really only works with Netlify builds and if so, is there any workaround to get the server part generated by Nuxt deployed easily?

Maybe, this should be made clear in the docsas well if it isn’t already 😃

2reactions
pi0commented, Apr 19, 2022

I see. Thanks for explaining. No, it shouldn’t be difficult just never tried it…

In your reproduction (https://github.com/anburocky3/iragugal-web/blob/main/.github/workflows/netlify.yml), can you please try adding NITRO_PRESET: 'netlify'?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Netlify Deploy · Actions · GitHub Marketplace
This is a simple GitHub Action to deploy a static website to Netlify. Usage. To use a GitHub action you can just reference...
Read more >
Guide for deploy using GitHub Actions - Netlify Support Forums
Can you create a proper guide to deploy static site to Netlify from GitHub Actions?
Read more >
CI/CD Pipeline with Netlify and GitHub Actions
In this tutorial, we'll set up a modern CI/CD Pipeline with GitHub Actions and Netlify. Show me the code! ☑️ Development and production ......
Read more >
Deploy a Website on Netlify using Github Actions - RavSam
First, change your Branch to Deploy to website-build . Second, update your Publish Directory to artifacts . Now, whenever a push will be...
Read more >
Setting up a CI/CD Pipeline with GitHub Actions & Netlify
In this video, we look at how to set up both a Continuous Delivery and Continuous Deployment process with Netlify (and the difference ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found