Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How do you do a preview deploy? #44

Closed
NullVoxPopuli opened this issue Jul 2, 2018 · 6 comments
Closed

How do you do a preview deploy? #44

NullVoxPopuli opened this issue Jul 2, 2018 · 6 comments

Comments

@NullVoxPopuli
Copy link

only seeing this in the deploy help:

 $ netlify deploy --help

  Usage: deploy [options]

  Push a new deploy to netlify

  Options:

    -h, --help         output usage information
    -s --site-id [id]  Deploy to site with <id>
    -p --path [path]   Path to a folder or zip file to deploy
    -d --draft         Deploy as a draft without publishing

I'm wanting to script the deploy so I can avoid using netlify's build tools
image

(I'm using gitlab and have a pretty slick setup so far)

my current production deploy script is:

      BRANCH=$(git rev-parse --abbrev-ref HEAD)

      if [[ "$BRANCH" == "master" ]]; then
        time ./run yarn build:production
        time npm i -g netlify-cli
        time netlify deploy -s emberclear -p packages/frontend/dist -t $NETLIFY_ACCESS_TOKEN -e production
      fi

was hoping to be able to do something for branches / previews as well.

thanks!

@fool
Copy link
Contributor

fool commented Jul 6, 2018

This repo and software is deprecated @NullVoxPopuli . However I can still answer your question.

There is no way to do a branch or preview deploy from the CLI. Only production (published) and draft (not published, can be published later if you want) are supported from the command line.

Our concept of deploy previews and branch deploys REQUIRE git backed builds, since they are about branches and PR's and we must build them to classify them as such. I understand that you are using the CLI in a git-backed environment, but our system is currently limited to considering git-backed deploys as being "built directly from git in our CI", and only those deploys will have the additional categories of deploy types available.

cc @bcomnes and @DavidWells as you think about the next CLI this is a feature request I've heard before.

@NullVoxPopuli
Copy link
Author

If this tool is deprecated, what's the recommended way to deploy from a ci environment?

@fool
Copy link
Contributor

fool commented Jul 6, 2018

netlifyctl was what was current in 2018. In 2019 and beyond, this repo is the best-supported CLI tool for Netlify.

(edited 17 Dec 2019)

@fool fool closed this as completed Jul 6, 2018
bcomnes added a commit that referenced this issue Aug 16, 2018
Use open-api spec directly
@kirillgroshkov
Copy link

Related: #275

@GeorgeTaveras1231
Copy link

@fool I understand your comment is old but it was a bit confusing to find that that repo claims to be deprecated and redirects users back to this repo. It's probably a good idea to update your comment to reflect that change to avoid any further confusion.

@fool
Copy link
Contributor

fool commented Dec 17, 2019

I think you figured it out ok :)

but I updated the comment anyway per your suggestion.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants