It's the day after Boxing Day, it's time to get this project completed! I've got an Action in mind, and I've done similar for the front end (day 47), so I hope this is smooth sailing... To recap, this action will create a CI/CD pipeline, which automates a SAM build and deploy every time the developer pushes code.
- CloudFormation template in project folder
- Project folder in a GitHub repository
- Working knowledge of YAML
- Creates a pipeline between the developer and the client. At the moment,
sam build
andsam deploy
are two seperate commands run in the terminal by the developer. The appropriate GitHub action will automate this, so everything is built and deployed every time the developer does agit push
to the GitHub repository.
-
Safety first, remember to create a new branch to do this in...
-
I built all this while referring to my notes for the front end. Really glad I took the time to document the process as I did today's task in a fraction of the time!
Thinking of npm packages and how I judge the safety and efficacy of them, I decided to go with the most popular one. If it's popular it's more likely that it's stable and being maintained regularly...
- Copy and paste the github action YAML into main.yml
- Remember to configure (in this case, AWS region and Python version) before saving
Settings
> Secrets
in the repo as you did before on the front end.
For this Action we only need to know AWS access key and secret access keys.
- Remember to merge with the main branch once you've succeeded
- Grateful to Past Sam for documenting the process - it took about 30 mins to implement today!
Good thing I planned this project out on a Trello board - I need to write a short blog to summarise the experience!