Skip to content

Branch deploys use wrong publish setting #6897

@infotexture

Description

@infotexture

Describe the bug

For my Jekyll site, I have the publish directory set to _site in the build settings.

This works fine for builds from the master branch, but branch deploys throw 404 errors and link to the “page not found” support guide.

As suggested there, I tried building the site locally with netlify build --dry, which revealed this clue as to what might be wrong:

A "_redirects" file is present in the repository but is missing in the publish directory "dist".

This suggests the [context.deploy-preview] is set to dist like in the sample-netlifytoml-file, instead of _site as specified in the build settings.

So far, I haven't been using file-based configuration, but I don't see any way to change the publish setting under Project configuration > Build & deploy > Continuous Deployment > Branches and deploy contexts, only the branch name pattern.

How can I make branch deploys use the same publish directory as builds from master?

Steps to reproduce

  1. Click Preview link in checks on 🚧 Draft 4.4 docs dita-ot/docs#659
  2. Note 404 error page, although GitHub says this CI workflow completed successfully

Configuration

No response

Deploy logs

6975538e105d64c4ae84af8f

Metadata

Metadata

Assignees

No one assigned

    Labels

    type: bugcode to address defects in shipped code

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions