Skip to content

Commit

Permalink
Added force, delete, github
Browse files Browse the repository at this point in the history
  • Loading branch information
neelasha23 committed Apr 17, 2024
1 parent a970e46 commit e026bd0
Showing 1 changed file with 57 additions and 0 deletions.
57 changes: 57 additions & 0 deletions doc/user-guide/cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ export PLOOMBER_CLOUD_KEY=YOURKEY
```

```{tip}
`pc` is a shortcut for `ploomber-cloud`. Example: `pc key`
```

Expand Down Expand Up @@ -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 <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`:
Expand Down Expand Up @@ -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.
Expand Down

0 comments on commit e026bd0

Please sign in to comment.