Azure Devops: Jekyll Deployment Issue - A workaround.
web jekyll devops azure-pipelines ruby
Credentialing Issue with Release of built Jekyll site from Azure Devops to Azure Storage/
My blog site is updated as follows
- Is Jekyll site
- Author or update new posts as Markdown files in VS Code
- Upload changes to repository in Azure Devops using one set of credentials
- Content is auto built
- It is published by copying Azure Blob Storage (different account).
- Delete target files
- Copy all of the _site files
That is work fine for a long time, except some versioning issues last June with eth build step
Azure DevOps Scripts
When the Build pipeline completes, the Publish Pipeline deletes all of the files in Blob Storage then copies the new content there:
In what follows, $(containerName)
is fixed as $web
.
Delete old Files
az storage blob delete-batch --source $(containerName) --account-name $(storageAccount) --output table
Upload new files
az storage blob upload-batch --source _site --destination $(containerName) --account-name $(storageAccount) --output table
Situation
The credentials from DevOps to Azure have expired then. When y to create New service connection no Azure Subscription shows. This did work for several years. Not solving that now but hope to in the future. My issue is the creditals for DevOps is different to that for Azure (Blob Storage).
Workaround, for now.
- Still upload to the repository
- I have a setup that sends an email whenever:
- Repository is updated
- Site build OK on Devops
- Site has been uploaded to Storage. <– Point of failure>
- Can check on my phone!
- I have a setup that sends an email whenever:
- Build the site locally
- Copy to Azure Blob Storage using (Azure Storage Explorer](https://azure.microsoft.com/en-us/products/storage/storage-explorer/?msockid=2eb1509be85a651222254520e9556416#Download-4)
- Copy to Containers/$Web
- For example, for this blog post, only need to copy the web folder (the catgerory), the cat and tags folder as well as index.html.
- Could script this. (Coming)
Postive
You only need to copy across the new and updated files, far quicker! A script is available for each Az Storage Explorer upload that could automate this alternative such as:
$env:AZCOPY_CRED_TYPE = "Anonymous";
$env:AZCOPY_CONCURRENCY_VALUE = "AUTO";
./azcopy.exe copy "C:\Folders\Source\repos\BlogSite\DJzBlog\_site\web\Web-Jekyll_Deployment_Issue-jekyll.html" "https://XXXXXXXXXX.blob.core.windows.net/$web/web/Web-Jekyll_Deployment_Issue-jekyll.html?sv=2023-01-03&se=2025-04-26T05%3A35%3A45Z&sr=c&sp=rwl&sig=EMP0%2BKOpR7XyCsSjL6s0neN%2BSdr%2BGySYLg5aTMS2ays%3D" --overwrite=prompt --from-to=LocalBlob --blob-type Detect --follow-symlinks --check-length=true --put-md5 --follow-symlinks --disable-auto-decoding=false --recursive --log-level=INFO;
$env:AZCOPY_CRED_TYPE = "";
$env:AZCOPY_CONCURRENCY_VALUE = "";
Also
Found I need to make a chamge to my Gem file:
# Performance-booster for watching directories on Windows
# gem "wdm", "~> 0.1.0" if Gem.win_platform?
gem "wdm", "~> 0.1", :platforms => [:mingw, :x64_mingw, :mswin]
Second line replaced by third.
wdn 0.2.9 was used:
Fetching wdm 0.2.0
Fetching google-protobuf 4.30.2 (x64-mingw-ucrt)
Installing wdm 0.2.0 with native extensions
Topic | Subtopic | |
This Category Links | ||
Category: | Web Sites Index: | Web Sites |
Next: > | Azure Devops | Jekyll Deployment - Script for Direct Deployment updates |
< Prev: | Azure Devops | Recap Creating this Blog Site |

