GithubHelp home page GithubHelp logo

Comments (4)

dbk91 avatar dbk91 commented on May 31, 2024 1

I think there are a few issues here.

  1. Usually the build directory is either .next/ if using next build or out if using next build && next export, so updating the publish-dir to one of those directories should get you closer to a solution.
  2. If you're planning on using a Next.js server runtime—which is the former of the build commands above—you'll need to have the Netlify + Next.js plugin

Having said that, I tried using this Github action to produce the Next.js runtime and it doesn't seem to be respecting it. Not sure if there is an option to include the build flag as a part of the process.

The equivalent command using Netlify Actions would be deploy --build.

from actions-netlify.

nwtgck avatar nwtgck commented on May 31, 2024

Could you show me the source?

from actions-netlify.

lucasggmc avatar lucasggmc commented on May 31, 2024

That is my full .yml file

name: ci

on:
  push:
    branches:
      - main

jobs:
  build:
    runs-on: ubuntu-latest

    env:
      GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

    steps:
      - name: Checkout repository!
        uses: actions/checkout@v2
        with:
          fetch-depth: 0

      - name: Setup Node
        uses: actions/setup-node@v1
        with:
          node-version: ^14.19.1

      - name: Install dependencies
        run: yarn --frozen-lockfile

      - name: Run Jest tests
        run: yarn test

      - name: Deploy to Netlify
        uses: nwtgck/actions-netlify@v1.2
        env:
          NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
          NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }}
        with:
          publish-dir: './public'
          production-branch: main
          production-deploy: true
        timeout-minutes: 2

from actions-netlify.

nwtgck avatar nwtgck commented on May 31, 2024

Thanks. The yaml doesn't seem to contain a build process. You need yarn build or something.

from actions-netlify.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.