This initially started out as a replacement to the official shuttle-hq/deploy-action as cargo shuttle deploy
used to fail if the deployment was already running.
Now, it is meant to be used on PRs to ensure it can be deployed on shuttle by testing it with a local run i.e cargo shuttle run
.
- Description: Specify a version of cargo-shuttle to install.
- Required: No
- Default: (Latest version if not specified)
- Example:
0.46.0
- Description: Contents of the
Secrets.toml
file used for deployment. - Required: No
- Example:
token = "mysecrettoken"
-
Install Dependencies: Installs necessary tools (
cargo binstall
) for managing Cargo binaries. -
Install cargo-shuttle:
- Installs the latest version of
cargo-shuttle
ifcargo-shuttle-version
is not specified. - Installs a specific version of
cargo-shuttle
ifcargo-shuttle-version
is provided.
- Installs the latest version of
-
Create
Secrets.toml
(ifsecrets
provided):- Creates a
Secrets.toml
file with the provided contents.
- Creates a
-
Run Project:
- Runs
cargo shuttle run
- Runs
uses: username/repo/path/to/shuttle-deploy
with:
cargo-shuttle-version: '0.5.1'
secrets: ${{ secrets.SECRETS_FILE_CONTENT }}