Deploying using GitHub actions
This guide explains how to set up a GitHub Action that automatically triggers a deployment to seenode whenever a commit is pushed to a specified branch.
Prerequisites
A GitHub repository where you want to set up the action.
A seenode application with an API endpoint for deployments.
A JWT authentication token for the seenode API.
Permissions to create GitHub Actions and manage repository secrets.
Step 1: Store sensitive data in GitHub secrets
To keep your credentials secure, store them as GitHub Secrets:
Go to your repository in GitHub.
Navigate to Settings → Secrets and variables → Actions.
Click New repository secret and add the following secrets:
SEENODE_APPLICATION_ID
→ Your seenode application ID.SEENODE_JWT_TOKEN
→ Your JWT authentication token.
Find application ID in the browser URL: https://cloud.seenode.com/dashboard/applications?applicationId=969217#logs) ⇒ application ID is 969217
Step 2: Create the GitHub actions workflow
In your repository, create a new directory:
.github/workflows/
(if it doesn’t exist).Inside the
.github/workflows/
directory, create a new file:deploy.yml
.Add the following content to
deploy.yml
:
Step 3: Commit and push the workflow
Save the
deploy.yml
file.Commit and push it to your repository:
Step 4: Verify the Workflow Execution
Go to your repository on GitHub.
Click on the Actions tab.
Locate the workflow run and verify that it executed successfully.
If there is an issue, click on the failed workflow run to check the logs for debugging.
Troubleshooting
Workflow is not triggering?
Ensure you are pushing to the correct branch (
main
by default in the workflow).Check if Actions are enabled in your repository settings.
Authentication error?
Verify that the JWT token is correct and not expired.
Ensure that
SEENODE_JWT_TOKEN
is set as a GitHub Secret.
Incorrect API endpoint?
Double-check the application ID and the API URL format.
Conclusion
You have now successfully set up a GitHub Action to automatically deploy to seenode when changes are pushed to the repository. This automation ensures that your deployments stay consistent and efficient.
Last updated