Im using a Azure VM for the first time (linux, Ubuntu 18) and Ive been tasked with setting a pipeline/release for continuous development for a simple website
Its supposed to work like this: when master branch is commited to Azure, automatically run the pipeline and release to deploy it to a directory in the VM (theres is no build involved, is a simple Wordpress site)
I managed to get it working like this:
- Ive set a pipeline that just gets the code from the git and copies it to $(Build.ArtifactStagingDirectory) (using a Copy Files task)
- than it publishes it as an artifact (using Publish Artifact task)
Then a release pipeline that does the following:
- copies the artifact files to the directory (using Copy Files task again)
It is working but it doenst seems good. Theres some obvious problems:
- is slow: it will copy all files every time, not just what was changed
- if I delete a file, it wont be deleted on the deploy directory
So what I want is some way to sync the git commit with the site directory, overwriting only changed files and deleting any deleted files, ignoring files and directories on .git-ignore etc
Seems simple (I know how to do it with git hooks) but I just cant find a way to do it in Azure DevOps
Is it possible? Can anyone give me a direction?