Deploy your applications using GitHub Actions - A step-by-step guide
This guide will walk you through setting up automated deployments for your applications using GitHub Actions and Valyent. By the end, you’ll have a fully automated CI/CD pipeline that builds, pushes, and deploys your application whenever you push code to your repository.
Let’s make sure you have everything needed to get started:
Create Your Valyent Account
Sign up for an account at the Valyent Console if you haven’t already.
Create Your Application
Set up your application in the Valyent Console. This is where your deployments will live.
Let’s configure the secrets your workflow will need:
Navigate to Repository Settings
Add Required Secrets
Create the following secrets by clicking “New repository secret” for each one:
Secret Name | Value to Add | How to Get It |
---|---|---|
VALYENT_API_KEY | Your API key | 1. Open Valyent Console 2. Navigate to “API Keys” 3. Create a new key and copy it |
VALYENT_ORG | Organization slug | Find this in your Valyent Console settings |
VALYENT_APP | Application name | Check your applications page or run valyent fleets list |
Your repository settings should look like this now.
Now, let’s set up the GitHub Actions workflow that will handle your deployments:
Create Workflow File
Create a new file at .github/workflows/build-and-deploy.yml
in your repository.
Add Workflow Configuration
Copy the following workflow configuration into your new file:
Complete Workflow Configuration
Understanding the Workflow
Here’s what each step in your workflow does:
Let’s verify everything works:
Trigger a Deployment
Monitor Progress
Watch the workflow run and check each step’s output for any issues.
Verify Deployment
Once complete, check your Valyent Console to see your deployed application.
If you run into problems, here’s how to fix common issues:
Common Issues and Solutions
Workflow Fails at Registry Login
VALYENT_API_KEY
secretBuild Step Fails
Deployment Step Fails
Now that your automated deployment is set up, consider:
Deploy your applications using GitHub Actions - A step-by-step guide
This guide will walk you through setting up automated deployments for your applications using GitHub Actions and Valyent. By the end, you’ll have a fully automated CI/CD pipeline that builds, pushes, and deploys your application whenever you push code to your repository.
Let’s make sure you have everything needed to get started:
Create Your Valyent Account
Sign up for an account at the Valyent Console if you haven’t already.
Create Your Application
Set up your application in the Valyent Console. This is where your deployments will live.
Let’s configure the secrets your workflow will need:
Navigate to Repository Settings
Add Required Secrets
Create the following secrets by clicking “New repository secret” for each one:
Secret Name | Value to Add | How to Get It |
---|---|---|
VALYENT_API_KEY | Your API key | 1. Open Valyent Console 2. Navigate to “API Keys” 3. Create a new key and copy it |
VALYENT_ORG | Organization slug | Find this in your Valyent Console settings |
VALYENT_APP | Application name | Check your applications page or run valyent fleets list |
Your repository settings should look like this now.
Now, let’s set up the GitHub Actions workflow that will handle your deployments:
Create Workflow File
Create a new file at .github/workflows/build-and-deploy.yml
in your repository.
Add Workflow Configuration
Copy the following workflow configuration into your new file:
Complete Workflow Configuration
Understanding the Workflow
Here’s what each step in your workflow does:
Let’s verify everything works:
Trigger a Deployment
Monitor Progress
Watch the workflow run and check each step’s output for any issues.
Verify Deployment
Once complete, check your Valyent Console to see your deployed application.
If you run into problems, here’s how to fix common issues:
Common Issues and Solutions
Workflow Fails at Registry Login
VALYENT_API_KEY
secretBuild Step Fails
Deployment Step Fails
Now that your automated deployment is set up, consider: