DEV Community

Discussion on: Tips and Tricks for GitHub Actions

Collapse
 
michaelcurrin profile image
Michael Currin

Here is my recipe for deploying a Node app to GH Pages. Instead of two jobs, I have one job and just have the last step run conditionally

michaelcurrin.github.io/code-cookb...

The downside of using two jobs is that you need extra code to save the build output from the one job and then open it in the second job. Because by default, nothing is persisted across jobs.

Collapse
 
msfjarvis profile image
Harsh Shandilya

You're correct about the lack of persistence across jobs. In the specific example from my post, the deployment step used to do a clean build every time so I opted to go for a separate job which would guarantee that releases wouldn't share any build outputs with the tests.