Troubleshooting and optimizing GitHub Actions
Let’s say you’ve set up GitHub Actions to automatically update, build, test, and deploy your one-page portfolio website every time you write a new line of code. But what if it doesn’t work as expected, or you want to make it work better? This section will explain how you can troubleshoot and optimize it, explained as if you’re learning to fix a bike with no prior experience.
Troubleshooting GitHub Actions
Imagine you’ve tried to ride your bike, but it won’t go. The first thing you’d do is check whether there’s something obviously wrong. In GitHub Actions, you have logs for this. Go to the Actions tab in your GitHub repository and find the run that didn’t work. Here, you can see a detailed log of what it tried to do and where things might have gone wrong, like noticing your bike chain is off.
Figure 9.18 – A GitHub Action log