wwt-user-website/azure-pipelines.yml

45 строки
1.3 KiB
YAML
Исходник Обычный вид История

# Custom pipeline here because unlike the other static sites, we can't run the
# build on Windows because we need to use a case-sensitive filesystem. That
# means that we can't use the AzureFileCopy command to upload the files to
# Azure Storage.
2020-04-26 01:54:40 +03:00
jobs:
- job: BuildAndPublish
pool:
vmImage: 'ubuntu-latest'
steps:
- checkout: self
submodules: recursive
- script: |
u='https://github.com/getzola/zola/releases/download/v${{ parameters.zolaVersion }}/zola-v${{ parameters.zolaVersion }}-x86_64-unknown-linux-gnu.tar.gz'
curl -fsSL "$u" |tar xz
displayName: Install Zola
- powershell: |
./zola check
displayName: Check site
- powershell: |
./zola build -o $(build.artifactStagingDirectory)
displayName: Build site
- task: PublishPipelineArtifact@0
displayName: Publish site as artifact
inputs:
artifactName: static-site
targetPath: $(Build.ArtifactStagingDirectory)
- task: AzureCLI@2
displayName: Upload to Azure Storage
inputs:
azureSubscription: 'aas@wwtadmindotnetfoundation'
scriptType: 'bash'
scriptLocation: 'inlineScript'
inlineScript: |
az storage blob sync -c '$web' -s $(build.artifactStagingDirectory)
env:
AZURE_STORAGE_CONNECTION_STRING: $(AZURE_STORAGE_CONNECTION_STRING)