Push Existing Static Website Code to DevOps Using Visual Studio Code, and Publish to Azure from DevOps

Push Existing Static Website Code to DevOps Using Visual Studio Code

Note: This can't be done via Visual Studio as Visual Studio doesn't have any project template for static web site (contain html, JavaScript, css, images etc only , no any .NET related code)

Step 1: Create a local folder c:\dev\wan\Peace Fountain as the .Git repository

Step 2: In DevOps

    2.1 Create a project named Peace Fountain

    2.3 Click "Clone in VS Code", select c:\dev\wan\Peace Fountain as repository location.

          Note: This will create a Peace Fountain sub folder under c:\dev\wan\Peace Fountain. We can see the auto-created .git under folder C:\dev\wan\Peace Fountain\Peace Fountain.

    2.4 Copy all existing static web site code to C:\dev\wan\Peace Fountain\Peace Fountain

Step 3: In Visual Studio Code

    3.1 Commit All

    3.2 When you click Synchronize Change button (the bottom line), you may see error: Git Error: 'fatal: Couldn't find remote ref master' (saywebsolutions.com)

    Solution: Push only rather than Sync

Other option:
Don't manually create Peace Fountain folder under c:\dev\wan. When clicking "Clone in VS Code", select c:\dev\wan" as repository location. This will auto-create Peace Fountain folder.

Ref: 

Publish Static Website to Azure using Visual Studio Code

For Azure Blob Storage Static Website:


For Static Web app:

In DevOps:

Create Pipeline/Please choose Use the classic editor to create a pipeline without YAML/Azure Repos Git/


Ref:


Comments

Popular posts from this blog

Use GnuPG Tools or C# Code for PGP Encryption and Signature

Errors in Net Core Add-Migration

Confusing Concepts about SFTP: SSH2 vs OpenSSH