Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs for kamal github action #89

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open

docs for kamal github action #89

wants to merge 5 commits into from

Conversation

snopoke
Copy link
Collaborator

@snopoke snopoke commented Aug 5, 2024

@snopoke snopoke changed the base branch from main to develop August 5, 2024 13:52
@snopoke snopoke requested a review from czue August 5, 2024 13:55
deployment/kamal.md Outdated Show resolved Hide resolved
- The known hosts file for your server. You can generate this by running `ssh-keyscan <your-server-ip>`.

With these secrets set, the GitHub Actions workflow will be able to deploy your app to Kamal. To test it
go to the "Actions" tab in your repository, click on the "Kamal Deploy" workflow, and then click "Run workflow".
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(It will also then run on every push to main, right?)

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we also have to tell them to uncomment the workflow_run section of the deploy file, right?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As it stands you can run it manually. For automated deploys you have to uncomment the lines in the workflow file as indicated by the comment in that file.

Copy link
Owner

@czue czue left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

couple more comments after reviewing the pegasus pr

- The known hosts file for your server. You can generate this by running `ssh-keyscan <your-server-ip>`.

With these secrets set, the GitHub Actions workflow will be able to deploy your app to Kamal. To test it
go to the "Actions" tab in your repository, click on the "Kamal Deploy" workflow, and then click "Run workflow".
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we also have to tell them to uncomment the workflow_run section of the deploy file, right?

- A private key you use to SSH into your server. This must be a passwordless key.
- `SSH_KNOWN_HOSTS`
- The known hosts file for your server. You can generate this by running `ssh-keyscan <your-server-ip>`.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We might also want a note here about it being tied to docker hub with a one-liner about how to chnage it.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've added a note about this. Depending on the repo there may be different steps required. I could add a second file for AWS ECR which is a bit different.

@czue
Copy link
Owner

czue commented Aug 6, 2024

@snopoke How would app-specific environment variables be handled if you were using this? Are those just managed outside this workflow?

deployment/kamal.md Outdated Show resolved Hide resolved
- `SSH_KEY`
- A private key you use to SSH into your server. This must be a passwordless key.
- `SSH_KNOWN_HOSTS`
- The known hosts file for your server. You can generate this by running `ssh-keyscan <your-server-ip>`.
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What exactly do I use here? If I run that command I get something like this:

# www.translationcreator.com:22 SSH-2.0-OpenSSH_8.9p1 Ubuntu-3ubuntu0.10
www.translationcreator.com ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAA....
# www.translationcreator.com:22 SSH-2.0-OpenSSH_8.9p1 Ubuntu-3ubuntu0.10
www.translationcreator.com ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHA....
# www.translationcreator.com:22 SSH-2.0-OpenSSH_8.9p1 Ubuntu-3ubuntu0.10
# www.translationcreator.com:22 SSH-2.0-OpenSSH_8.9p1 Ubuntu-3ubuntu0.10

Do I just paste that whole thing into the environment variable?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes

@snopoke
Copy link
Collaborator Author

snopoke commented Aug 6, 2024

@snopoke How would app-specific environment variables be handled if you were using this? Are those just managed outside this workflow?

Yes, they are handled outside this workflow (same as normal Kamal deploys - except for the first one)

Base automatically changed from develop to main August 7, 2024 07:18

### Deploy with GitHub Actions

As of version 2024.8, your repository also includes a GitHub Actions workflow that can be used to deploy your app to Kamal
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
As of version 2024.8, your repository also includes a GitHub Actions workflow that can be used to deploy your app to Kamal
As of version 2024.9, your repository also includes a GitHub Actions workflow that can be used to deploy your app to Kamal

Hopefully

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Needs to be updated to the actual release version

@czue
Copy link
Owner

czue commented Aug 19, 2024

(don't merge till released)

deployment/kamal.md Outdated Show resolved Hide resolved
@czue czue changed the base branch from main to develop December 2, 2024 15:26
Co-authored-by: Simon Kelly <[email protected]>
Base automatically changed from develop to main January 27, 2025 10:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants