This GitHub Action deploys using Kamal. Supports Kamal v2.0 and later.
To update the README to reflect the optional environment
input, you can modify the usage section to indicate that environment
is no longer required and explain how the action behaves when environment
is omitted.
Here's how the README might look:
This GitHub Action deploys your application using Kamal and handles cancellation gracefully.
Name | Description | Required | Default |
---|---|---|---|
environment |
Optional deployment environment (e.g., production , staging ). If omitted, the --destination flag is not passed. |
No | None |
registry-username |
Registry Username (e.g., Digital Ocean Access Token) | Yes | |
registry-password |
Registry Password (e.g., Digital Ocean Access Token) | Yes | |
kamal-path |
Path to the Kamal binary file. | No | ./bin/kamal |
workdir |
The working directory from which Kamal should be executed. | No | . |
Note: Only
registry-username
andregistry-password
are required. Any other necessary configuration, such asDATABASE_URL
,REDIS_URL
, andRAILS_MASTER_KEY
, should be provided as environment variables in the workflow file.
steps:
- name: Kamal Deploy
uses: igor-alexandrov/[email protected]
with:
# environment: 'staging' # Optional, only used if provided
registry-username: ${{ secrets.KAMAL_REGISTRY_USERNAME }}
registry-password: ${{ secrets.KAMAL_REGISTRY_PASSWORD }}
env:
DATABASE_URL: ${{ secrets.DATABASE_URL }}
REDIS_URL: ${{ secrets.REDIS_URL }}
RAILS_MASTER_KEY: ${{ secrets.RAILS_MASTER_KEY }}
This action uses @vercel/ncc
to bundle the source code and dependencies into a single file for distribution. Before publishing or committing updates to your action, you need to compile the code.
npm install @vercel/ncc --save-dev
ncc build index.js --out dist