From 71b5c41a8e85fa31e2ee7ff962655320f54d50bc Mon Sep 17 00:00:00 2001 From: Sarangan Rajamanickam Date: Tue, 17 Dec 2024 21:51:13 +0000 Subject: [PATCH] [@typespec/spec-dashboard] Deploy Spec Dashboard (#5381) --- eng/tsp-core/pipelines/dashboard-deploy.yml | 45 +++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 eng/tsp-core/pipelines/dashboard-deploy.yml diff --git a/eng/tsp-core/pipelines/dashboard-deploy.yml b/eng/tsp-core/pipelines/dashboard-deploy.yml new file mode 100644 index 0000000000..dfb85ea8de --- /dev/null +++ b/eng/tsp-core/pipelines/dashboard-deploy.yml @@ -0,0 +1,45 @@ +trigger: + branches: + include: + - main + # For patch releases + - release/* + +variables: + connectionString: $(AZ_SPEC_DASHBOARD_CONNECTION_STRING) + +extends: + template: /eng/common/pipelines/templates/1es-redirect.yml + parameters: + variables: + - template: /eng/tsp-core/pipelines/templates/variables/globals.yml@self + + stages: + - stage: build + displayName: Build and Deploy + + pool: + name: $(WINDOWSPOOL) + image: $(WINDOWSVMIMAGE) + os: windows + + jobs: + - job: build + displayName: Build + + variables: + TYPESPEC_SKIP_DOCUSAURUS_BUILD: true # Disable docusaurus build + + steps: + - template: /eng/tsp-core/pipelines/templates/install.yml + - template: /eng/tsp-core/pipelines/templates/build.yml + + - task: AzureCLI@2 + inputs: + azureSubscription: "TypeSpec Storage" + scriptType: "bash" + scriptLocation: "inlineScript" + inlineScript: | + echo "Uploading files to Azure Blob Storage..." + az storage blob upload-batch --source packages/spec-dashboard/dist/ --destination '$web' --overwrite --connection-string "$AZURE_STORAGE_CONNECTION_STRING" + displayName: "Upload files to Azure Blob Storage"