GitHub Actions CD Setup
Learn to set up basic GitHub Actions CD.
We'll cover the following
As we have the CI workflow up and running, we can extend our GitHub Actions workflow to deploy our serverless application if all tests pass. The deployment will be done using the sls deploy
command from the Serverless Framework. We'll also need to securely pass AWS credentials to the GitHub Actions environment.
Adding secrets
Let's first add AWS credentials, to our GitHub repository:
Navigate to our GitHub repository in our web browser.
Click the “Settings” tab of the repository.
In the left sidebar, click “Secrets and variables.”
Click the “Actions” button.
Click the “New repository secret” button.
We'll be asked to provide a name and a value for the secret. The name should be
AWS_ACCESS_KEY_ID
for our AWS access key andAWS_SECRET_ACCESS_KEY
for our AWS secret access key. Paste the corresponding values in the “Value” field. Remember, these values should be kept confidential.Click “Add secret” to save each secret.
Get hands-on with 1200+ tech skills courses.