Deploying a website from GitHub to a VM using a workflow
by SamHobbs from LinuxQuestions.org on (#6CZ57)
I intend to develop the following types of websites.
An ASP.Net Core application needs to be built for its deployment. A Serverless website is one generated by a generator such as the Jekyll static site generator or ASP.Net Core Blazor WebAssembly. A HTML-only website only needs to be copied for implementation.
I am learning GitHub workflows and SSH and related software. As a beginner I want to just be able to deploy a HTML-only website. I have searched and found many relevant articles and samples.
Some of them use appleboy/ssh-action to do git clone in SSH. I do not understand how that works; git clone clones the entire repository, right?
Some of them use actions/checkout and then SCP to copy from the GitHub runner to the system being deployed to. I am concerned that if I delete or rename a file in the project then SCP will not remove the unneeded file, correct? That is not a major problem but it is not the best possible solution.
Does that sound accurate?
I am thinking of using SSH to use git clone to a temporary directory then copying only the files that need to be deployed, such as copying all files and subdirectories of the public directory in the repository. I would delete or rename the current directory first so that the new directory has just the files (and subdirectories) that are needed. Should that work?
- ASP.Net Core
- Serverless
- HTML-only (including CSS, JavaScript and images)
An ASP.Net Core application needs to be built for its deployment. A Serverless website is one generated by a generator such as the Jekyll static site generator or ASP.Net Core Blazor WebAssembly. A HTML-only website only needs to be copied for implementation.
I am learning GitHub workflows and SSH and related software. As a beginner I want to just be able to deploy a HTML-only website. I have searched and found many relevant articles and samples.
Some of them use appleboy/ssh-action to do git clone in SSH. I do not understand how that works; git clone clones the entire repository, right?
Some of them use actions/checkout and then SCP to copy from the GitHub runner to the system being deployed to. I am concerned that if I delete or rename a file in the project then SCP will not remove the unneeded file, correct? That is not a major problem but it is not the best possible solution.
Does that sound accurate?
I am thinking of using SSH to use git clone to a temporary directory then copying only the files that need to be deployed, such as copying all files and subdirectories of the public directory in the repository. I would delete or rename the current directory first so that the new directory has just the files (and subdirectories) that are needed. Should that work?