Mini Rust CLI to deploy sites to Netlify using their API

Overview

Netlify Deploy CLI

This is a Rust CLI that uses the Netlify API to deploy sites.

To work properly, the NETLIFY_SITE_ID and NETLIFY_AUTH_TOKEN environment variables need to be set, similar to the official Netlify CLI.

This is still an early-on prototype so there may be bugs about. It does not have the full functionality of the official CLI but it was able to solve my particular use case of running netlify deploy in CI environments.

Comments
  • Setup full release CI workflow

    Setup full release CI workflow

    I currently have a system that I can manually create a pre-release and then grab the artifacts based on the git commit, but for more stable builds, I'd like to have a workflow that is as follows:

    • User creates tag / release draft. This triggers Actions workflow
    • Run linting & testing (rustfmt, cargo check and cargo clippy) to make sure everything is fine before building
    • Build binaries for Windows, Mac, and Linux
    • Upload each binary to the release
    • Publish the release

    Other Solutions

    On top of this, I could look into tools like Covector to automate the release process to a point. Not set in stone with anything yet but it could be useful to build some system for publishing rust binaries so I can use it on other applications I build in the future.

    As well, this may be useful for libraries as well of instead of building binaries I can create a semi-automated cargo publish workflow for releases of any crates I decide to develop.

    opened by lannonbr 1
  • Clean up debug statements for file hashes

    Clean up debug statements for file hashes

    For large sites, listing out the files & hashes to be deployed is going to be taxing and probably isn't necessary to use so I will want to remove the various dbg! / println! calls I currently have in the program.

    opened by lannonbr 1
  • Publish New Versions

    Publish New Versions

    Version Updates

    Merging this PR will bump all of the applicable packages based on your change files.

    netlify_deploy

    [0.3.0]

    • The File I/O reads & HTTP requests are now running asynchronously on top of Tokio. This reduced a 2,000 file upload to Netlify down to ~1 minute.
      • 238b450 Switching sync tasks to run async on 2021-05-22
    version updates 
    opened by github-actions[bot] 0
  • Switching sync tasks to run async

    Switching sync tasks to run async

    Helps with #6 by moving the std::fs calls to tokio::fs and instead of running the reqwest::Request::send() calls in series because of the await at the end of each, I threw them into a stream of Futures which lets them run concurrently. Also, Netlify's API has a concurrency limit of 5 requests at any given time for the starter plan & 10 for the paid plans, so I am throttling the Futures to only run at a max concurrency of 5.

    opened by lannonbr 0
  • Publish New Versions

    Publish New Versions

    Version Updates

    Merging this PR will bump all of the applicable packages based on your change files.

    netlify_deploy

    [0.2.2]

    • Trying a final time to fix the workflow
      • f4bd2e2 final tweak to CI on 2021-05-20
    version updates 
    opened by github-actions[bot] 0
  • Publish New Versions

    Publish New Versions

    Version Updates

    Merging this PR will bump all of the applicable packages based on your change files.

    netlify_deploy

    [0.2.1]

    • Updated version-or-publish workflow to get rid of duplicate release, update the release name, and properly populate release body.
      • 30689f4 update workflow on 2021-05-20
    version updates 
    opened by github-actions[bot] 0
  • Publish New Versions

    Publish New Versions

    Version Updates

    Merging this PR will bump all of the applicable packages based on your change files.

    netlify_deploy

    [0.2.0]

    • Added color-eyre and bimap packages.
      • 1dc4cb2 Adding covector on 2021-05-20
    • Add flag for deploying to production or not. See #3
      • 1dc4cb2 Adding covector on 2021-05-20
    • Cleaning up reqwest logic by inserting headers directly into RequestBuilder chain.
      • 1dc4cb2 Adding covector on 2021-05-20
    version updates 
    opened by github-actions[bot] 0
  • Duplicate files are not uploaded

    Duplicate files are not uploaded

    I've modified the program pretty substantially but I'm pretty sure the issue is present in the version in this repo.

    The hashes BiMap is unique for both the right and left values; if two files have the same contents the second will overwrite the first because the hashes (right value in the bimap) are the same. The list of files sent to netlify is then generated from hashes and thus won't include multiple files with the same content.

    opened by Yarn 0
  • output the deploy url

    output the deploy url

    When uploading as part of a non-production build, it would be helpful to somehow return the url of the preview that is created. That url can then be included as a comment on a PR. This makes it easier to review dependency updates that are opened through a bot.

    opened by jbolda 0
  • feat: minimize deploy workflow

    feat: minimize deploy workflow

    Motivation

    covector added a couple of additional output helpers that allow us to simplify the workflow more than we had previously built. These have recently been published so updating!

    Approach

    We combined a couple of jobs into 1 and used conditional properties.

    opened by jbolda 0
  • Look into adding further logging

    Look into adding further logging

    Currently I have color-eyre for errors, but I would like to add further logging for the CLI. Possibility is using the tracing crate from the Tokio project

    opened by lannonbr 0
  • Add Apple Silicon builds to CI

    Add Apple Silicon builds to CI

    Apple Silicon builds (cargo target aarch64-apple-darwin) seems to require MacOS Big Sur which is only available at the moment as a private preview on GitHub Actions, so until then I will not be able to build Apple Silicon builds in CI until that is opened to the public.

    That said, once things are resolved there, I may ship a universal binary for MacOS so you can download one binary and it can work on both Intel and Apple Silicon Macs.

    opened by lannonbr 0
Releases(netlify_deploy-v0.3.0)
Owner
Benjamin Lannon
Web Developer in Upstate New York - He / Him
Benjamin Lannon
A tool to filter sites in a FASTA-format whole-genome pseudo-alignment

Core-SNP-filter This is a tool to filter sites (i.e. columns) in a FASTA-format whole-genome pseudo-alignment based on: Whether the site contains vari

Ryan Wick 15 Apr 2, 2023
Sero is a web server that allows you to easily host your static sites without pain. The idea was inspired by surge.sh but gives you full control.

sero Lightning-fast, static web publishing with zero configuration and full control ?? Table Of Contents ?? Table Of Contents ?? Tools ❓ About The Pro

Dmitry Miasnenko 6 Nov 13, 2023
A mini paste bin and url shortener written in rust without databases.

pb Build $ cargo build --release Environment Variables PB_DATA: /some/path (Default: ./pb_data) PB_SITE: Url of your site. (Default: http://localhost:

Edward P 5 Jul 26, 2022
Uses the cardano mini-protocols to receive every block and transaction, and save them to a configurable destination

cardano-slurp Connects to one or more cardano-node's, streams all available transactions, and saves them to disk (or to S3) in raw cbor format. Usage

Pi Lanningham 16 Jan 31, 2023
CLI tool to find duplicate files based on their hashes.

Dupper Dupper is a CLI tool that helps you identify duplicate files based on their hashes (using the Seahash hashing algorithm). Installation You can

Rubén J.R. 4 Dec 27, 2022
Rust based Kubernetes Operator to deploy K8s objects minimally.

kube-nimble nimble /ˈnɪmbl/ - quick and light in movement or action; agile. This project began from a place of curiosity about Kubernetes CRDs and the

Meet Vasani 3 Feb 26, 2024
Deploy dioxus-web to Vercel.

Dioxus demo This demo shows how to use Dioxus to build a static web application and deploy it to Vercel. Local development To run the demo locally, yo

Zihua Wu 8 Dec 28, 2022
A Command-line tool to create, manage and deploy your python projects

PPM A Command-line tool to create, manage and deploy your python projects Table of Contents PPM Main Features Create a Project project.ini file Projec

FUSEN 6 Aug 30, 2022
Cedar-agent is the easiest way to deploy and run Cedar

Cedar Agent What is Cedar-Agent? Cedar-Agent is an HTTP server designed to efficiently manage a policy store and a data store. It provides a seamless

Permit.io 30 May 26, 2023
Create, manage and deploy p2panda schemas

fishy Create, manage and deploy p2panda schemas Releases | Contribute | Website Command-line-tool to easily create update and share your p2panda schem

null 4 Jul 28, 2023
Calculate a player's skill level using Elo, DWZ, Ingo, TrueSkill, Glicko and Glicko-2 algorithms known from their usage in chess and online games.

skillratings Skillratings allows you to calculate the player's skill instantly in 1v1 matches or after tournaments/rating periods with a list of resul

null 10 Dec 30, 2022
A tool for chatting using the ChatGPT API, written in Rust CLI.

ChatGPT CLI A tool for chatting using the ChatGPT API, written in Rust CLI. You can use this tool to chat, just by setting your API Key. You can modif

null 6 Apr 5, 2023
A CLI tool you can pipe code and then ask for changes, add documentation, etc, using the OpenAI API.

AiBro This is your own little coding bro, immersed in the world of AI, crypto, and all other types of over hyped tech trends. You can pipe it code and

Josh Bainbridge 5 Sep 5, 2023
Oxygen is a voice journal and audio analysis toolkit for people who want to change the way their voice comes across.

Oxygen Voice Journal Oxygen is a voice journal and audio analysis toolkit for people who want to change the way their voice comes across. Or rather, i

Jocelyn Stericker 32 Oct 20, 2022
The library for those who need a little extra from their windows. ™

WinEx The library for those who need a little extra from their windows. ™ WinEx - Short for Window Extended - is a library whose goal is to implement

Matheus Branco Borella 2 Mar 27, 2022
trigger io::Error's in test, and annotate their source

fault-injection docs Similar to the try! macro or ? operator, but externally controllable to inject faults during testing. Unlike the try! macro or ?

Komora 18 Dec 16, 2022
A command line tool for people of transgender experience to replace their deadname within a Git repo.

chowndn (Change Owner from Dead Name) A command line tool for people of transgender experience to replace their dead name within a Git repo. See chown

Christi Miller 23 Dec 6, 2022
Boxxy puts bad Linux applications in a box with only their files.

boxxy is a tool for boxing up misbehaving Linux applications and forcing them to put their files and directories in the right place, without symlinks!

amy null 910 Feb 22, 2023
FileSorterX is an automatic file sorting application that sorts your files into folders based on their file extension

FileSorterX is an automatic file sorting application that sorts your files into folders based on their file extension. With FileSorterX, you can easily keep your files organized and find what you need quickly.

Xanthus 22 Apr 4, 2023