Skip to content

Commit

Permalink
Update docs to prefer the setup-flyctl action
Browse files Browse the repository at this point in the history
  • Loading branch information
jsierles committed Mar 26, 2022
1 parent 71e5829 commit 67ddda2
Showing 1 changed file with 16 additions and 12 deletions.
28 changes: 16 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
# GitHub Actions for flyctl

This action wraps the flyctl CLI tool to allow deploying and managing fly apps.

## Usage

### Deploy
This action wraps the flyctl CLI tool to allow deploying and managing fly apps. We recommend using the `setup-flyctl` action which runs outside of Docker for speed and flexibility.
## Usage for deployment

```yaml
name: Deploy to Fly
Expand All @@ -16,15 +13,20 @@ jobs:
steps:
# This step checks out a copy of your repository.
- uses: actions/checkout@v2
- uses: superfly/flyctl-actions@master
- uses: superfly/flyctl-actions/setup-flyctl@master
- run: flyctl deploy --remote-only
env:
FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }}
with:
args: "deploy"
```
To use a specific version of `flyctl`:

### Run one off scripts
```yaml
- uses: superfly/flyctl-actions/setup-flyctl@master
with:
version: 0.0.308
```
### Run one-off scripts

```yaml
name: Run on Fly
Expand All @@ -35,11 +37,10 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: superfly/flyctl-actions@master
- uses: superfly/flyctl-actions/setup-flyctl@master
- run: "flyctl ssh console --command 'sh ./myscript.sh'"
env:
FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }}
with:
args: "ssh console --command 'sh ./myscript.sh'"
```

See the [flyctl](https://github.com/superfly/flyctl) GitHub project for more information on using `flyctl`.
Expand All @@ -48,3 +49,6 @@ See the [flyctl](https://github.com/superfly/flyctl) GitHub project for more inf

`FLY_API_TOKEN` - **Required**. The token to use for authentication. You can find a token by running `flyctl auth token` or going to your [user settings on fly.io](https://fly.io/user/personal_access_tokens).

## Using the `setup-flyctl` action

This documentation only covers usage of the `setup-flyctl` action. The main action in this repository runs more slowly inside Docker, so is not recommended. It's been kept in place since many CI pipelines are still using it.

0 comments on commit 67ddda2

Please # to comment.