Search code examples
gitgithubversion-controlgithub-actionsgit-workflow

How to control git which deploys to different release nos


I am handling a project with a directory structure I am unaware of, instead of having project directories on the root, it is nested in deploy/releases/108 where there are 3 other directories named 1, 106, 107 and all contain the project which I am supposed to have at root.

Below is the screenshot of directory structure;

Directory structure with releases

Here 108 is the current release number, so any changes needed to be done are in here, and I guess 1, 106, 107 are older versions, So I just wanted to know the configuration/service or app behind this structure and how I can have control over it?

While looking at logs, I found out that maybe git is doing this, below is the snip of the log file, But how can I know from which git account it is being done and how can I have control over it.

Deploy Log File

I can see a reference of the above log file in GitHub workflow action which ran successfully. Below is the snippet;

Github workflow action


Solution

  • Right now, your GitHub action relies on a symlink (symbolic link) deploy/current referencing one of the release/xxx folders (here, releases/107)

    Reorganise the repository in order to:

    • import each releases/xxx content into a release branch
    • tag each import with a release number (like tag 107)
    • remove any releases/xxx folder
    • add a release number as a parameter of your GitHub Action
    • make said GitHub Action switch to the parameterized tag (release number)

    Having folders for version/release is something I saw in the 2000's with SVN (Subversion).
    This is not the Git way.