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:

  1. Navigate to our GitHub repository in our web browser.

  2. Click the “Settings” tab of the repository.

  3. In the left sidebar, click “Secrets and variables.”

  4. Click the “Actions” button.

  5. Click the “New repository secret” button.

  6. 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 and AWS_SECRET_ACCESS_KEY for our AWS secret access key. Paste the corresponding values in the “Value” field. Remember, these values should be kept confidential.

  7. Click “Add secret” to save each secret.

Get hands-on with 1200+ tech skills courses.