Now that the auto-deployment to the staging server is working, we need to set up auto-deployment to the regular demo server.
In the push.yml workflow, a couple of the jobs use the "staging" environment. We'll need to create a new GitHub environment called "production" that has the environment variables set to the production server values. Then we can use the same code that we use to deploy to staging for deploying to production.
To trigger deploying to the demo server, we can use this condition a new GitHub workflow file:
Now that the auto-deployment to the staging server is working, we need to set up auto-deployment to the regular demo server.
In the
push.yml
workflow, a couple of the jobs use the "staging" environment. We'll need to create a new GitHub environment called "production" that has the environment variables set to the production server values. Then we can use the same code that we use to deploy to staging for deploying to production.To trigger deploying to the demo server, we can use this condition a new GitHub workflow file:
Possibly can use a shared workflow for the deployment code, with "staging" or "production" as input. https://docs.github.com/en/actions/using-workflows/reusing-workflows