This project includes a Ruby script to automate the creation of a GitHub Actions workflow for deploying with Kamal 2.
- Automatically creates a
.github/workflows/deploy.yml
file. - Configures GitHub Actions to:
- Run on
push
to themain
branch or manually viaworkflow_dispatch
. - Deploy your application using Kamal 2.
- Run on
- Ruby 3.2 or compatible version.
kamal
gem installed.
- Save the
setup_github_actions.rb
script to your project directory. - Run the script:
ruby setup_github_actions.rb
- The GitHub Actions workflow file will be created at
.github/workflows/deploy.yml
.
Add a repository secret named KAMAL_DEPLOYMENT
in your GitHub repository:
- Go to Settings > Secrets and variables > Actions.
- Add a new secret:
- Name:
KAMAL_DEPLOYMENT
- Value: Your Kamal deployment configuration.
- Name:
- Update the Ruby version in the workflow if needed.
- Add additional steps to the workflow for dependency installation or pre-deployment tasks.
This project is licensed under the MIT License.