![npm install from github branch npm install from github branch](https://miro.medium.com/max/6720/1*VhtZoFDHVuGrABiwz627TQ.png)
To get this right, I needed a couple of iterations and a lot of failing builds, and that's why I decided to write a small post about it. So I took some time to merge the two workflows into a single workflow.
#Npm install from github branch update
Update : You can now compose your workflow by reusing composite actions, GitHub Actions: Reduce duplication with action composition and GitHub Actions: reusable workflows is generally availableīecause having a single workflow avoids duplication and thus makes it easier to make a change to the workflow, for example, to use a new version of Node.js, or to add an additional step.
![npm install from github branch npm install from github branch](https://dcv19h61vib2d.cloudfront.net/thumbs/scikit-learn-restoring-commits-with-git-reflog-SypvQzBm4/scikit-learn-restoring-commits-with-git-reflog-SypvQzBm4.jpg)
or I completely missed that this was a possibility in the documentation when I initially set up my workflow pipelines. I'm not sure, but I think that this wasn't always the case. Now, after a big year, I noticed that several workflows of projects that I'm working on have conditionally configured some steps in their workflow.
![npm install from github branch npm install from github branch](https://developer.mozilla.org/en-US/docs/MDN/Contribute/GitHub_beginners/code-popup.png)
These two workflows were almost identical copies, except for the part that the main branch workflow included a release step. Each project had two workflows, one workflow that ran on Pull Requests, and a second workflow that was triggered when someone pushed a commit to the main branch. When Github released GitHub Actions I moved most of my CI/CD pipelines to use a Github workflow. All posts TLDR Version ? Just show me the code already