This PR is a suggested way to remove redundancy in code. Rather than have a separate action defined for each state, this updated workflow uses a matrix strategy. Also, rather than having a separate R script for each state, it passes the state through an environment variable that is set in GitHub actions with env: and picked up in the R scrip with Sys.getenv().
I've tested this with a couple states on my fork, but it should work with all the states enabled.
This PR is a suggested way to remove redundancy in code. Rather than have a separate action defined for each state, this updated workflow uses a matrix strategy. Also, rather than having a separate R script for each state, it passes the state through an environment variable that is set in GitHub actions with
env:
and picked up in the R scrip withSys.getenv()
.I've tested this with a couple states on my fork, but it should work with all the states enabled.