Nuxt dist folder not created with github acionns

Hi all,

I hope are well.

Nuxt 3 does not create the dist folder when using GitHub actions. I followed the boilerplate in this link: Netlify Actions · Actions · GitHub Marketplace · GitHub. Still, after numerous attempts, the dist folder is not created. There are other similar posts but none of them offer a solution.

Sitename: https://csci-e-114-final-project-pochat.netlify.app/

Error:

Deploy path: /home/runner/work/csci-e-114-final-project-pochat/csci-e-114-final-project-pochat/dist
 ›   Error: The deploy directory "/home/runner/work/csci-e-114-final-project-pochat/csci-e-114-final-project-pochat/dist" has not been found. Did you forget to run 'netlify build'?
Error: Process completed with exit code 1.

My yml file:

name: Deploy to Netlify

on:
  push:
    branches: [ main ]

jobs:
  build-and-deploy:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4

      - name: Use Node.js 16
        uses: actions/setup-node@v4
        with:
          node-version: 16

      - name: Clean (assuming you want to clean before install)
        run: npm ci 

      - name: Install dependencies
        run: npm install

      - name: Build Nuxt app
        run: npm run build

      - name: Linked Deploy to Netlify
        env:
          NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
          NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }}
        timeout-minutes: 1

        run: netlify deploy --site ${{ secrets.NETLIFY_SITE_ID }} --auth ${{ secrets.NETLIFY_AUTH_TOKEN }} --prod

Any help is appreciated.

I take it you found the solution to this issue?

Hi @dig,

I hope you are well, and thank you for checking.

I found that worked for me, but I’m not sure if that is the correct way of doing it, or if it is just a workaround.

Thank you.

By any chance did you read over the Nuxt v3 deployment documentation which states

That’s it! You can now deploy the .output/public directory to any static hosting service or preview it locally with npx serve .output/public.

This is different to what is in the Nuxt on Netlify documentation though.

Hi @dig,

I hope you are well.

I only read the Netflify documentation indicating ‘dist’ as the folder. I guess I got lucky to find the '.outfput/public/. ’ However, your email ensures this is the correct way to do it.

Thank you for your time.