Error: no files or functions to deploy

Hello, I need help with debugging my github action. I’ve created my initial deployment to Netlify from my development branch. Now I want to do it automatically while pushing to a specific branch.

Here is my job:

name: GitHub Actions Netlify Development Deployment

on:
  push:
    branches:
      - development

jobs:
  Deploy-Development:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout repository
        uses: actions/checkout@v4

      - name: Configure node
        uses: ./.github/actions/setup-project

      - name: Format & Lint code
        uses: ./.github/actions/format-code

      - name: Build app
        run: npm run build
        env:
          DATABASE_URL: ${{ secrets.DEV_DATABASE_URL }}
          NEXTAUTH_SECRET: ${{ secrets.NEXTAUTH_SECRET }}
          NEXT_ENV: 'development'

      - name: Deploy app to Netlify development env
        uses: nwtgck/actions-netlify@v3.0
        with:
          publish-dir: '.next'
          production-branch: development
          github-token: ${{ secrets.GITHUB_TOKEN }}
          deploy-message: 'Deploy from GitHub Actions'
        env:
          NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
          NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }}
          DATABASE_URL: ${{ secrets.DEV_DATABASE_URL }}
          NEXTAUTH_SECRET: ${{ secrets.NEXTAUTH_SECRET }}
          NEXTAUTH_URL: ${{ secrets.NEXTAUTH_URL }}
          API_KEY: ${{ secrets.API_KEY }}
          NEXT_ENV: 'development'
        timeout-minutes: 1

I don’t know why but I’ve got an error while deploying:
image

My settings from initial deploy to Netlify are:
runtime: Next.js
build command: npm run build
publish directory: .next
package directory: not set
functions directory: netlify/functions
build status: stopped

1 Like

We do not provide support with writing GitHub Actions or the third-party package that you’re using:

Ideally, you simply need to install netlify-cli and run npx netlify deploy --build with NETLIFY_AUTH_TOKEN and NETLIFY_SITE_ID as the environment variables.

Thanks for response :slight_smile:

1 Like