From e026bd03bcaf9019abe76116db7720bdbd1999ee Mon Sep 17 00:00:00 2001 From: neelasha23 Date: Wed, 17 Apr 2024 17:58:06 +0530 Subject: [PATCH] Added force, delete, github --- doc/user-guide/cli.md | 57 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) diff --git a/doc/user-guide/cli.md b/doc/user-guide/cli.md index 10cf85b4..03e61d28 100644 --- a/doc/user-guide/cli.md +++ b/doc/user-guide/cli.md @@ -19,6 +19,7 @@ export PLOOMBER_CLOUD_KEY=YOURKEY ``` ```{tip} + `pc` is a shortcut for `ploomber-cloud`. Example: `pc key` ``` @@ -73,6 +74,47 @@ Then, execute: ploomber-cloud deploy ``` +## Force initialize an app + +You might want to re-initialize your project in case the `ploomber-cloud.json` file has got corrupted or doesn't contain the valid keys. + +Then run the `init` command with the `--force` flag: + +```sh +ploomber-cloud init --force +``` + +It can also be combined with the `--from-existing` for re-initializing from an existing project: + +```sh +ploomber-cloud init --from-existing --force +``` + +## Delete an app + +For deleting a particular app run the `delete` command with the `--project-id` flag: + +```sh +ploomber-cloud delete --project-id +``` + +To delete all apps: + +```sh +ploomber-cloud delete --all +``` + +It should display a confirmation message: + +```sh +Are you sure you want to delete all projects? +This action is irreversible and cannot be undone. +Pressing forward with this will result in a loss of all project data and configurations. +If you're unsure or wish to reconsider, please cancel immediately by pressing Ctrl + C. [y/N]: +``` + +Confirm with `y` to delete all projects in your account. + ## Deploying an example Ploomber Cloud hosts example applications for many different frameworks. To download and deploy one, run `ploomber-cloud examples`: @@ -100,6 +142,21 @@ ploomber-cloud examples flask/basic-app A full list of example applications is available [here](https://github.com/bryannho/doc/tree/main/examples) + +## Configure GitHub action + +If your project is hosted on GitHub, you can configure an action for triggering project deployment everytime code changes are pushed. + +For configuring a GitHub action through CLI run the command: + +```sh +ploomber-cloud github +``` + +On confirming with `y` the CLI will create a `ploomber-cloud.yaml` file in the path `.github/workflows`. +Click [here](../user-guide/cli.md#configure-action-through-cli) to learn more about configuring a GitHub action. + + ## Defining secrets If your project uses secrets, you can define them in an `.env` file.