Skip to content

Commit

Permalink
Add example usage (#7)
Browse files Browse the repository at this point in the history
* Add example usage

* Add job matching documentation
  • Loading branch information
jswny authored Jul 28, 2020
1 parent 621a159 commit a6b8286
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ A [GitHub Action](https://github.com/features/actions) to deploy apps to any ser
- **A GitHub Actions workflow** to run this Action

## Usage
1. Include this Action in your workflow (see below for examples)
1. Include this Action in your workflow. For example, see [the demo version run in this repository under the `deploy` job here](https://github.com/jswny/deploy/blob/master/.github/workflows/ci.yml).
2. Encrypt your private deployment SSH key into using OpenSSL `aes-256-cbc` and commit **the encrypted version** to your repository: `openssl enc -aes-256-cbc -salt -in deploy_key -out deploy_key.enc -k "<encryption key>`. You can decrypt it if needed with `openssl enc -aes-256-cbc -d -in deploy_key.enc -out deploy_key -k "<encryption key>"`.
3. Fill in the inputs as noted below.
4. Create a `Dockerfile` for your app, use any environment variables that you need injected as you would usually.
Expand All @@ -23,6 +23,7 @@ A [GitHub Action](https://github.com/features/actions) to deploy apps to any ser
- `$CONTAINER_NAME` will be generated by the Action, so you must ensure that your Compose file uses this as the container name.
- Any environment variables you need to pass through to your various app services are included under the `environment` key.
6. Ensure any environment variables specified in the `env_var_prefixes` input are passed into the Action via the `env` key (see the input below, and examples).
7. Make sure the Action is only triggered on the appropriate events using [`jobs.<job_id>.if`](https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#jobsjob_idif).

## Inputs
### `deploy_server`
Expand Down

0 comments on commit a6b8286

Please sign in to comment.