Skip to content

Question about the "deploy" step (#16) #24

Open
@enaluz

Description

@enaluz

In the README, the deploy target is said to have a deploy step. I tried reading through the source code to better understand how it works, but couldn't figure out what exactly what happens in the deploy step.

For context, I have an monorepo named "frontend", which contains some apps (/apps/web, for example). When I try firing off a deployment for this project whenever there is a merge to main (via Github Actions), the /dist directory doesn't show up when I view the available files from heroku run bash -a <app-name>. I'm guessing that no build command is actually running in Heroku, which is why there's no dist folder. When I try to view the app, I get an nginx 404 error.

Happy to provide more context.

Thanks!

Activity

getlarge

getlarge commented on Aug 9, 2024

@getlarge
Owner

I don't know how familiar you are with deployment on Heroku. Each application is backed by a Git repo and the deployment phase is just about pushing your code to the corresponding Git remote on Heroku. You might want to read this.
The corresponding code in the executor can be found here.

Your dist directory is most probably ignored in your Git repository config, leading to your deployment to not contain the build.
To build a JS app in Heroku, you would usually deal with build hooks, and the process would run on Heroku side.
You can also read this section from the README.md.

When/if you get it to work, an example setup would be a great contribution :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @getlarge@enaluz

        Issue actions

          Question about the "deploy" step (#16) · Issue #24 · getlarge/nx-heroku