Closed stojkovicv closed 1 month ago
Thanks @stojkovicv I suggest to split this up into two jobs. It looks like a change to the master
branch will also redeploy the development
branch and vice versa. What we can do is define a common job that takes some configuration variables like the port and the target folder. Then we use this common job in two separate jobs triggered for the development
branch and the master
branch. A similar example can be found here: https://github.com/Dash-Industry-Forum/dash.js/tree/development/.github/workflows
deploy.yml
: Defines the main jobdeploy_latest.yml
: Deploys the latest stable version using deploy.yml
by providing the required parametersdeploy_nightly
: Deploys the latest staging version using deploy.yml
by providing the required parametersI changed pipeline's structure to conduct one main workflow for two different scenarios. I also tested it on my fork repository for both deployment types.
@stojkovicv Please add the required secrets to the project. Let me know if you are running into issues
Description
This PR adds the deployment automation script which is triggered on every code change in the
development
ormaster
branch. It will automatically connect to the Linode instance over the SSH protocol, pull the latest code and reactivate the web servers. Linode instance hosts two separate folders, one for the master code and another for the development, just to keep things tidy. The Nginx proxy is configured to activate authentication for two locations:/webui
-> deploying latest master code/webui-staging
-> deploying latest development codeIn order for this pipeline to work, 3 secret values has to be configured in the settings of this repository: ssh key, linode user and the machine's IP address.
Related Issue: #54