{"id":76351,"date":"2019-04-05T10:50:56","date_gmt":"2019-04-05T17:50:56","guid":{"rendered":"https:\/\/cloudblogs.microsoft.com\/opensource\/?p=76351"},"modified":"2025-06-27T09:21:44","modified_gmt":"2025-06-27T16:21:44","slug":"publishing-github-pages-from-azure-pipelines","status":"publish","type":"post","link":"https:\/\/opensource.microsoft.com\/blog\/2019\/04\/05\/publishing-github-pages-from-azure-pipelines\/","title":{"rendered":"Publishing GitHub Pages from Azure Pipelines"},"content":{"rendered":"\n<p>Do you work on or maintain a project for technical users? A key part of attracting users, especially to an open source project, is publishing great documentation. However, keeping it up to date as your APIs and concepts change can be challenging or just time-consuming.<\/p>\n\n\n\n<p>A popular way to maintain great docs is to keep them in your project\u2019s repo. Often they\u2019re built from some kind of easy-to-edit source format (like Markdown) and rendered as HTML. Once you\u2019ve built the HTML, where do you publish it? For open source projects on GitHub, a seemingly obvious choice is&nbsp;<a href=\"https:\/\/pages.github.com\/\">GitHub Pages<\/a>.<\/p>\n\n\n\n<p>GitHub Pages will automatically handle building Jekyll content for you. In my case, however, I want to generate my own HTML. First, I\u2019ll show you what I set up in my own GitHub repo. At the end, I\u2019ll walk you through building and publishing your own GitHub Pages using Azure Pipelines.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"what-we-ll-need\">What we\u2019ll need<\/h2>\n\n\n\n<p>We\u2019re going to need:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>A system for transforming content into HTML<\/li>\n\n\n\n<li>Some source content<\/li>\n\n\n\n<li>A repo on GitHub to hold this stuff<\/li>\n<\/ul>\n\n\n\n<p>And we\u2019ll build a pipeline for automating our publishing step.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"our-content-system\">Our content system<\/h2>\n\n\n\n<p>Markdown is an extremely popular source format for documentation, so is reStructuredText (at least if you\u2019re into Python). This isn\u2019t a post about Markdown or rST, though. In order to keep things generic, I\u2019m going to invent the world\u2019s silliest documentation system: all it knows how to do is take a directory of HTML files and replace the token \u201c{{ NOW }}\u201d with the current time. It\u2019s a shell script like this:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: bash; title: ; notranslate\" title=\"\">\n#!\/usr\/bin\/env bash\n\n# docs.sh\n\nROOT=$(cd `dirname $0` && pwd)\nSRC_DIR=$ROOT\/src\nDEST_DIR=$ROOT\n\nNOW=$(date)\n\n# if we don't have any HTML files, don't do anything\nshopt -s nullglob\nfor f in $SRC_DIR\/*.html\ndo\n    echo Processing $f\n    DEST_FILE=$DEST_DIR\/$(basename $f)\n    # replace \"{{ NOW }}\" with the time this script started\n    sed \"s\/{{ NOW }}\/$NOW\/g\" <$f >$DEST_FILE\ndone\n<\/pre><\/div>\n\n\n<p>And as for source content, we\u2019ll start with just an index.html file:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: xml; title: ; notranslate\" title=\"\">\n<!DOCTYPE html>\n<!-- src\/index.html -->\n<html>\n  <head>\n    <meta charset=\"UTF-8\">\n    <title>Hello World!<\/title>\n  <\/head>\n  <body>\n    <h1>Hello World!<\/h1>\n    <p>Adding another line!<\/p>\n    <p>This page was generated {{ NOW }}.<\/p>\n  <\/body>\n<\/html>\n<\/pre><\/div>\n\n<figure class=\"wp-block-image aligncenter\"><img decoding=\"async\" src=\"https:\/\/opensource.microsoft.com\/blog\/wp-content\/uploads\/2019\/04\/Github-pages-1.webp\" alt=\"GitHub pages tutorial - doc language\" class=\"wp-image-76363 webp-format\" srcset=\"https:\/\/opensource.microsoft.com\/blog\/wp-content\/uploads\/2019\/04\/Github-pages-1.webp 2272w, https:\/\/opensource.microsoft.com\/blog\/wp-content\/uploads\/2019\/04\/Github-pages-1-300x232.webp 300w, https:\/\/opensource.microsoft.com\/blog\/wp-content\/uploads\/2019\/04\/Github-pages-1-1024x793.webp 1024w, https:\/\/opensource.microsoft.com\/blog\/wp-content\/uploads\/2019\/04\/Github-pages-1-768x595.webp 768w, https:\/\/opensource.microsoft.com\/blog\/wp-content\/uploads\/2019\/04\/Github-pages-1-1536x1190.webp 1536w, https:\/\/opensource.microsoft.com\/blog\/wp-content\/uploads\/2019\/04\/Github-pages-1-2048x1586.webp 2048w, https:\/\/opensource.microsoft.com\/blog\/wp-content\/uploads\/2019\/04\/Github-pages-1-323x250.webp 323w, https:\/\/opensource.microsoft.com\/blog\/wp-content\/uploads\/2019\/04\/Github-pages-1-330x256.webp 330w, https:\/\/opensource.microsoft.com\/blog\/wp-content\/uploads\/2019\/04\/Github-pages-1-800x620.webp 800w, https:\/\/opensource.microsoft.com\/blog\/wp-content\/uploads\/2019\/04\/Github-pages-1-400x310.webp 400w\" data-orig-src=\"https:\/\/opensource.microsoft.com\/blog\/wp-content\/uploads\/2019\/04\/Github-pages-1.png\" data-orig-srcset=\"https:\/\/opensource.microsoft.com\/blog\/wp-content\/uploads\/2019\/04\/Github-pages-1.png 2272w, https:\/\/opensource.microsoft.com\/blog\/wp-content\/uploads\/2019\/04\/Github-pages-1-300x232.png 300w, https:\/\/opensource.microsoft.com\/blog\/wp-content\/uploads\/2019\/04\/Github-pages-1-1024x793.png 1024w, https:\/\/opensource.microsoft.com\/blog\/wp-content\/uploads\/2019\/04\/Github-pages-1-768x595.png 768w, https:\/\/opensource.microsoft.com\/blog\/wp-content\/uploads\/2019\/04\/Github-pages-1-1536x1190.png 1536w, https:\/\/opensource.microsoft.com\/blog\/wp-content\/uploads\/2019\/04\/Github-pages-1-2048x1586.png 2048w, https:\/\/opensource.microsoft.com\/blog\/wp-content\/uploads\/2019\/04\/Github-pages-1-323x250.png 323w, https:\/\/opensource.microsoft.com\/blog\/wp-content\/uploads\/2019\/04\/Github-pages-1-330x256.png 330w, https:\/\/opensource.microsoft.com\/blog\/wp-content\/uploads\/2019\/04\/Github-pages-1-800x620.png 800w, https:\/\/opensource.microsoft.com\/blog\/wp-content\/uploads\/2019\/04\/Github-pages-1-400x310.png 400w\"><\/figure>\n\n\n\n<p>Here\u2019s what that looks like, side-by-side:<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"our-github-pages-repo\">Our GitHub Pages repo<\/h2>\n\n\n\n<p>If you aren\u2019t familiar with it, GitHub Pages lets you push HTML content to a Git repo and have it automatically show up on an HTTP server. You can make Pages for a project, for yourself, or for an organization (with slightly different capabilities on each). I followed GitHub\u2019s&nbsp;<a href=\"https:\/\/help.github.com\/en\/articles\/creating-project-pages-using-the-command-line\">great tutorial on Pages from the command line<\/a>&nbsp;to get started. My username is&nbsp;<em>vtbassmatt<\/em>, so I decided to make a&nbsp;<a href=\"https:\/\/vtbassmatt.github.io\/\">user page for myself<\/a>. My repo is called&nbsp;<a href=\"https:\/\/github.com\/vtbassmatt\/vtbassmatt.github.io\">vtbassmatt\/vtbassmatt.github.io<\/a>.<\/p>\n\n\n<figure class=\"wp-block-image aligncenter\"><img decoding=\"async\" src=\"https:\/\/opensource.microsoft.com\/blog\/wp-content\/uploads\/2019\/04\/Github-pages-2.webp\" alt=\"Our GitHub Pages repo image\" class=\"wp-image-76366 webp-format\" srcset=\"https:\/\/opensource.microsoft.com\/blog\/wp-content\/uploads\/2019\/04\/Github-pages-2.webp 2582w, https:\/\/opensource.microsoft.com\/blog\/wp-content\/uploads\/2019\/04\/Github-pages-2-300x198.webp 300w, https:\/\/opensource.microsoft.com\/blog\/wp-content\/uploads\/2019\/04\/Github-pages-2-1024x676.webp 1024w, https:\/\/opensource.microsoft.com\/blog\/wp-content\/uploads\/2019\/04\/Github-pages-2-768x507.webp 768w, https:\/\/opensource.microsoft.com\/blog\/wp-content\/uploads\/2019\/04\/Github-pages-2-1536x1014.webp 1536w, https:\/\/opensource.microsoft.com\/blog\/wp-content\/uploads\/2019\/04\/Github-pages-2-2048x1352.webp 2048w, https:\/\/opensource.microsoft.com\/blog\/wp-content\/uploads\/2019\/04\/Github-pages-2-330x218.webp 330w, https:\/\/opensource.microsoft.com\/blog\/wp-content\/uploads\/2019\/04\/Github-pages-2-800x528.webp 800w, https:\/\/opensource.microsoft.com\/blog\/wp-content\/uploads\/2019\/04\/Github-pages-2-400x264.webp 400w\" data-orig-src=\"https:\/\/opensource.microsoft.com\/blog\/wp-content\/uploads\/2019\/04\/Github-pages-2.png\" data-orig-srcset=\"https:\/\/opensource.microsoft.com\/blog\/wp-content\/uploads\/2019\/04\/Github-pages-2.png 2582w, https:\/\/opensource.microsoft.com\/blog\/wp-content\/uploads\/2019\/04\/Github-pages-2-300x198.png 300w, https:\/\/opensource.microsoft.com\/blog\/wp-content\/uploads\/2019\/04\/Github-pages-2-1024x676.png 1024w, https:\/\/opensource.microsoft.com\/blog\/wp-content\/uploads\/2019\/04\/Github-pages-2-768x507.png 768w, https:\/\/opensource.microsoft.com\/blog\/wp-content\/uploads\/2019\/04\/Github-pages-2-1536x1014.png 1536w, https:\/\/opensource.microsoft.com\/blog\/wp-content\/uploads\/2019\/04\/Github-pages-2-2048x1352.png 2048w, https:\/\/opensource.microsoft.com\/blog\/wp-content\/uploads\/2019\/04\/Github-pages-2-330x218.png 330w, https:\/\/opensource.microsoft.com\/blog\/wp-content\/uploads\/2019\/04\/Github-pages-2-800x528.png 800w, https:\/\/opensource.microsoft.com\/blog\/wp-content\/uploads\/2019\/04\/Github-pages-2-400x264.png 400w\"><\/figure>\n\n\n\n<p>Because I\u2019m publishing a user page, GitHub will publish whatever is on master. I also chose to leave the source of my content in master. This gives me a neat side-effect: the content for my page will be accessible on the web (at&nbsp;<a href=\"https:\/\/vtbassmatt.github.io\/src\">\/src<\/a>) as well as the \u201crendered\u201d HTML.<\/p>\n\n\n<figure class=\"wp-block-image aligncenter\"><img decoding=\"async\" src=\"https:\/\/opensource.microsoft.com\/blog\/wp-content\/uploads\/2019\/04\/Github-pages-3.webp\" alt=\"Hello World! image\" class=\"wp-image-76369 webp-format\" srcset=\"https:\/\/opensource.microsoft.com\/blog\/wp-content\/uploads\/2019\/04\/Github-pages-3.webp 2582w, https:\/\/opensource.microsoft.com\/blog\/wp-content\/uploads\/2019\/04\/Github-pages-3-300x198.webp 300w, https:\/\/opensource.microsoft.com\/blog\/wp-content\/uploads\/2019\/04\/Github-pages-3-1024x676.webp 1024w, https:\/\/opensource.microsoft.com\/blog\/wp-content\/uploads\/2019\/04\/Github-pages-3-768x507.webp 768w, https:\/\/opensource.microsoft.com\/blog\/wp-content\/uploads\/2019\/04\/Github-pages-3-1536x1014.webp 1536w, https:\/\/opensource.microsoft.com\/blog\/wp-content\/uploads\/2019\/04\/Github-pages-3-2048x1352.webp 2048w, https:\/\/opensource.microsoft.com\/blog\/wp-content\/uploads\/2019\/04\/Github-pages-3-330x218.webp 330w, https:\/\/opensource.microsoft.com\/blog\/wp-content\/uploads\/2019\/04\/Github-pages-3-800x528.webp 800w, https:\/\/opensource.microsoft.com\/blog\/wp-content\/uploads\/2019\/04\/Github-pages-3-400x264.webp 400w\" data-orig-src=\"https:\/\/opensource.microsoft.com\/blog\/wp-content\/uploads\/2019\/04\/Github-pages-3.png\" data-orig-srcset=\"https:\/\/opensource.microsoft.com\/blog\/wp-content\/uploads\/2019\/04\/Github-pages-3.png 2582w, https:\/\/opensource.microsoft.com\/blog\/wp-content\/uploads\/2019\/04\/Github-pages-3-300x198.png 300w, https:\/\/opensource.microsoft.com\/blog\/wp-content\/uploads\/2019\/04\/Github-pages-3-1024x676.png 1024w, https:\/\/opensource.microsoft.com\/blog\/wp-content\/uploads\/2019\/04\/Github-pages-3-768x507.png 768w, https:\/\/opensource.microsoft.com\/blog\/wp-content\/uploads\/2019\/04\/Github-pages-3-1536x1014.png 1536w, https:\/\/opensource.microsoft.com\/blog\/wp-content\/uploads\/2019\/04\/Github-pages-3-2048x1352.png 2048w, https:\/\/opensource.microsoft.com\/blog\/wp-content\/uploads\/2019\/04\/Github-pages-3-330x218.png 330w, https:\/\/opensource.microsoft.com\/blog\/wp-content\/uploads\/2019\/04\/Github-pages-3-800x528.png 800w, https:\/\/opensource.microsoft.com\/blog\/wp-content\/uploads\/2019\/04\/Github-pages-3-400x264.png 400w\"><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"the-pipeline\">The pipeline<\/h2>\n\n\n\n<p>The heart of the system is this Azure Pipelines YAML file:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: yaml; title: ; notranslate\" title=\"\">\n# Publish GitHub Pages\n# azure-pipelines.yml\n\ntrigger:\n- master\n\npool:\n  vmImage: 'Ubuntu-16.04'\n\nsteps:\n- script: |\n    .\/docs.sh\n    git config --local user.name \"Azure Pipelines\"\n    git config --local user.email \"azuredevops@microsoft.com\"\n    git add .\n    git commit -m \"Publishing GitHub Pages  ***NO_CI***\"\n  displayName: 'Build and commit pages'\n\n- task: DownloadSecureFile@1\n  inputs:\n    secureFile: deploy_key\n  displayName: 'Get the deploy key'\n\n- script: |\n    mkdir ~\/.ssh && mv $DOWNLOADSECUREFILE_SECUREFILEPATH ~\/.ssh\/id_rsa\n    chmod 700 ~\/.ssh && chmod 600 ~\/.ssh\/id_rsa\n    ssh-keyscan -t rsa github.com >> ~\/.ssh\/known_hosts\n    git remote set-url --push origin git@github.com:vtbassmatt\/vtbassmatt.github.io.git\n    git push origin HEAD:master\n  displayName: 'Publish GitHub Pages'\n  condition: |\n    and(not(eq(variables['Build.Reason'], 'PullRequest')),\n        eq(variables['Build.SourceBranch'], 'refs\/heads\/master'))\n<\/pre><\/div>\n\n\n<p>This pipeline will trigger whenever I push to master and will run on the hosted Ubuntu agent pool. The first script step will run my silly doc generator, then check in the generated docs.<\/p>\n\n\n\n<p>What\u2019s that&nbsp;<em>***NO_CI***<\/em>&nbsp;token for? We\u2019re eventually going to push this commit back to master. But recall that this pipeline triggers on pushes to master\u2026 which would lead to an infinite loop of pipelines running. The&nbsp;<em>***NO_CI***<\/em>&nbsp;statement tells Azure Pipelines not to trigger on this commit. (Azure Pipelines also understands&nbsp;<a href=\"https:\/\/docs.microsoft.com\/azure\/devops\/pipelines\/build\/triggers#skipping-ci-for-individual-commits\">a few other ways to skip CI for a commit<\/a>.)<\/p>\n\n\n\n<p>The next step is a task which downloads a file that\u2019s been securely stored. That file is the private key of a GitHub&nbsp;<a href=\"https:\/\/developer.github.com\/v3\/guides\/managing-deploy-keys\/#deploy-keys\">deploy key<\/a>. By presenting the private key, GitHub will allow my build agent to authenticate and push changes to the repo.<\/p>\n\n\n<figure class=\"wp-block-image aligncenter\"><img decoding=\"async\" src=\"https:\/\/opensource.microsoft.com\/blog\/wp-content\/uploads\/2019\/04\/Github-pages-4.webp\" alt=\"vtbassmatt.github.io screenshot\" class=\"wp-image-76372 webp-format\" srcset=\"https:\/\/opensource.microsoft.com\/blog\/wp-content\/uploads\/2019\/04\/Github-pages-4.webp 1364w, https:\/\/opensource.microsoft.com\/blog\/wp-content\/uploads\/2019\/04\/Github-pages-4-300x210.webp 300w, https:\/\/opensource.microsoft.com\/blog\/wp-content\/uploads\/2019\/04\/Github-pages-4-1024x716.webp 1024w, https:\/\/opensource.microsoft.com\/blog\/wp-content\/uploads\/2019\/04\/Github-pages-4-768x537.webp 768w, https:\/\/opensource.microsoft.com\/blog\/wp-content\/uploads\/2019\/04\/Github-pages-4-330x231.webp 330w, https:\/\/opensource.microsoft.com\/blog\/wp-content\/uploads\/2019\/04\/Github-pages-4-800x560.webp 800w, https:\/\/opensource.microsoft.com\/blog\/wp-content\/uploads\/2019\/04\/Github-pages-4-400x280.webp 400w\" data-orig-src=\"https:\/\/opensource.microsoft.com\/blog\/wp-content\/uploads\/2019\/04\/Github-pages-4.png\" data-orig-srcset=\"https:\/\/opensource.microsoft.com\/blog\/wp-content\/uploads\/2019\/04\/Github-pages-4.png 1364w, https:\/\/opensource.microsoft.com\/blog\/wp-content\/uploads\/2019\/04\/Github-pages-4-300x210.png 300w, https:\/\/opensource.microsoft.com\/blog\/wp-content\/uploads\/2019\/04\/Github-pages-4-1024x716.png 1024w, https:\/\/opensource.microsoft.com\/blog\/wp-content\/uploads\/2019\/04\/Github-pages-4-768x537.png 768w, https:\/\/opensource.microsoft.com\/blog\/wp-content\/uploads\/2019\/04\/Github-pages-4-330x231.png 330w, https:\/\/opensource.microsoft.com\/blog\/wp-content\/uploads\/2019\/04\/Github-pages-4-800x560.png 800w, https:\/\/opensource.microsoft.com\/blog\/wp-content\/uploads\/2019\/04\/Github-pages-4-400x280.png 400w\"><\/figure>\n\n\n\n<p>Finally, the last script step pushes the commit back to GitHub. SSH is picky about file locations, directory permissions, and connecting to a host it has never seen before. The first three lines take care of getting the private key in the right place.<\/p>\n\n\n\n<p>It\u2019s worth nothing: Azure Pipelines has a native&nbsp;<em>InstallSSHKey<\/em>&nbsp;task. That would have handled downloading the secure file and adding the known_hosts entry. I opted to do this manually with shell scripts, mostly as a learning exercise.<\/p>\n\n\n\n<p>The fourth line changes our push URL from&nbsp;<em>https:\/\/<\/em>&nbsp;to<em>&nbsp;ssh:\/\/<\/em>, which will tell Git to present the SSH key. You\u2019ll obviously want to change the values to match your repo.<\/p>\n\n\n\n<p>Because of the way Azure Pipelines optimizes fetching Git repos, from Git\u2019s perspective, we aren\u2019t actually on the master branch. That\u2019s why we have to use the&nbsp;<em>refspec HEAD:master<\/em>&nbsp;on the final line which calls&nbsp;<em>git push<\/em>.<\/p>\n\n\n\n<p>That condition is a little wild as well. You can read it like a prefix-notation functional language (or an Excel formula, if you prefer): \u201cRun this step only if the variable&nbsp;<em>Build.Reason<\/em>&nbsp;is NOT \u2018PullRequest\u2019 and the variable&nbsp;<em>Build.SourceBranch<\/em>&nbsp;is \u2018master\u2019.\u201d<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"following-along-at-home\">Following along at home<\/h2>\n\n\n\n<p>Now we have all the pieces in place. To replicate what I\u2019ve done:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Set up your GitHub repo with the shell script, the source content, and the azure-pipelines.yml file. Make sure to edit the pipeline to apply to your GitHub repo. (Hint: your GitHub username is\u00a0<em>not<\/em>\u00a0<em>vtbassmatt<\/em>!)<\/li>\n\n\n\n<li>Install the\u00a0<a href=\"https:\/\/github.com\/marketplace\/azure-pipelines\">Azure Pipelines app<\/a>\u00a0and go through the setup experience. Your first build will fail because you don\u2019t have the secure file in place \u2013 that\u2019s OK.<\/li>\n\n\n\n<li>Generate your deploy key and give the public half to GitHub.<\/li>\n<\/ol>\n\n\n<figure class=\"wp-block-image aligncenter\"><img decoding=\"async\" src=\"https:\/\/opensource.microsoft.com\/blog\/wp-content\/uploads\/2019\/04\/Github-pages-5-1024x676.webp\" alt=\"3. Generate your deploy key screenshot\" class=\"wp-image-76375 webp-format\" srcset=\"https:\/\/opensource.microsoft.com\/blog\/wp-content\/uploads\/2019\/04\/Github-pages-5.webp 2582w, https:\/\/opensource.microsoft.com\/blog\/wp-content\/uploads\/2019\/04\/Github-pages-5-300x198.webp 300w, https:\/\/opensource.microsoft.com\/blog\/wp-content\/uploads\/2019\/04\/Github-pages-5-1024x676.webp 1024w, https:\/\/opensource.microsoft.com\/blog\/wp-content\/uploads\/2019\/04\/Github-pages-5-768x507.webp 768w, https:\/\/opensource.microsoft.com\/blog\/wp-content\/uploads\/2019\/04\/Github-pages-5-1536x1014.webp 1536w, https:\/\/opensource.microsoft.com\/blog\/wp-content\/uploads\/2019\/04\/Github-pages-5-2048x1352.webp 2048w, https:\/\/opensource.microsoft.com\/blog\/wp-content\/uploads\/2019\/04\/Github-pages-5-330x218.webp 330w, https:\/\/opensource.microsoft.com\/blog\/wp-content\/uploads\/2019\/04\/Github-pages-5-800x528.webp 800w, https:\/\/opensource.microsoft.com\/blog\/wp-content\/uploads\/2019\/04\/Github-pages-5-400x264.webp 400w\" data-orig-src=\"https:\/\/opensource.microsoft.com\/blog\/wp-content\/uploads\/2019\/04\/Github-pages-5.png\" data-orig-srcset=\"https:\/\/opensource.microsoft.com\/blog\/wp-content\/uploads\/2019\/04\/Github-pages-5.png 2582w, https:\/\/opensource.microsoft.com\/blog\/wp-content\/uploads\/2019\/04\/Github-pages-5-300x198.png 300w, https:\/\/opensource.microsoft.com\/blog\/wp-content\/uploads\/2019\/04\/Github-pages-5-1024x676.png 1024w, https:\/\/opensource.microsoft.com\/blog\/wp-content\/uploads\/2019\/04\/Github-pages-5-768x507.png 768w, https:\/\/opensource.microsoft.com\/blog\/wp-content\/uploads\/2019\/04\/Github-pages-5-1536x1014.png 1536w, https:\/\/opensource.microsoft.com\/blog\/wp-content\/uploads\/2019\/04\/Github-pages-5-2048x1352.png 2048w, https:\/\/opensource.microsoft.com\/blog\/wp-content\/uploads\/2019\/04\/Github-pages-5-330x218.png 330w, https:\/\/opensource.microsoft.com\/blog\/wp-content\/uploads\/2019\/04\/Github-pages-5-800x528.png 800w, https:\/\/opensource.microsoft.com\/blog\/wp-content\/uploads\/2019\/04\/Github-pages-5-400x264.png 400w\"><\/figure>\n\n\n\n<p>4. Give the private half of the deploy key to Azure Pipelines: Go to the Library on your Azure Pipelines organization and create a secure file called \u201cdeploy_key\u201d. &nbsp;You\u2019ll also want to click Edit on the secure file and check the \u201cAuthorize for use in all pipelines\u201d box.<\/p>\n\n\n<figure class=\"wp-block-image aligncenter\"><img decoding=\"async\" src=\"https:\/\/opensource.microsoft.com\/blog\/wp-content\/uploads\/2019\/04\/Github-pages-6-1024x676.webp\" alt=\"4. Give the private half of the deploy key to Azure Pipelines\" class=\"wp-image-76378 webp-format\" srcset=\"https:\/\/opensource.microsoft.com\/blog\/wp-content\/uploads\/2019\/04\/Github-pages-6.webp 2582w, https:\/\/opensource.microsoft.com\/blog\/wp-content\/uploads\/2019\/04\/Github-pages-6-300x198.webp 300w, https:\/\/opensource.microsoft.com\/blog\/wp-content\/uploads\/2019\/04\/Github-pages-6-1024x676.webp 1024w, https:\/\/opensource.microsoft.com\/blog\/wp-content\/uploads\/2019\/04\/Github-pages-6-768x507.webp 768w, https:\/\/opensource.microsoft.com\/blog\/wp-content\/uploads\/2019\/04\/Github-pages-6-1536x1014.webp 1536w, https:\/\/opensource.microsoft.com\/blog\/wp-content\/uploads\/2019\/04\/Github-pages-6-2048x1352.webp 2048w, https:\/\/opensource.microsoft.com\/blog\/wp-content\/uploads\/2019\/04\/Github-pages-6-330x218.webp 330w, https:\/\/opensource.microsoft.com\/blog\/wp-content\/uploads\/2019\/04\/Github-pages-6-800x528.webp 800w, https:\/\/opensource.microsoft.com\/blog\/wp-content\/uploads\/2019\/04\/Github-pages-6-400x264.webp 400w\" data-orig-src=\"https:\/\/opensource.microsoft.com\/blog\/wp-content\/uploads\/2019\/04\/Github-pages-6.png\" data-orig-srcset=\"https:\/\/opensource.microsoft.com\/blog\/wp-content\/uploads\/2019\/04\/Github-pages-6.png 2582w, https:\/\/opensource.microsoft.com\/blog\/wp-content\/uploads\/2019\/04\/Github-pages-6-300x198.png 300w, https:\/\/opensource.microsoft.com\/blog\/wp-content\/uploads\/2019\/04\/Github-pages-6-1024x676.png 1024w, https:\/\/opensource.microsoft.com\/blog\/wp-content\/uploads\/2019\/04\/Github-pages-6-768x507.png 768w, https:\/\/opensource.microsoft.com\/blog\/wp-content\/uploads\/2019\/04\/Github-pages-6-1536x1014.png 1536w, https:\/\/opensource.microsoft.com\/blog\/wp-content\/uploads\/2019\/04\/Github-pages-6-2048x1352.png 2048w, https:\/\/opensource.microsoft.com\/blog\/wp-content\/uploads\/2019\/04\/Github-pages-6-330x218.png 330w, https:\/\/opensource.microsoft.com\/blog\/wp-content\/uploads\/2019\/04\/Github-pages-6-800x528.png 800w, https:\/\/opensource.microsoft.com\/blog\/wp-content\/uploads\/2019\/04\/Github-pages-6-400x264.png 400w\"><\/figure>\n\n\n<figure class=\"wp-block-image aligncenter\"><img decoding=\"async\" src=\"https:\/\/opensource.microsoft.com\/blog\/wp-content\/uploads\/2019\/04\/Github-pages-7-1024x676.webp\" alt=\"Library deploy key screenshot\" class=\"wp-image-76381 webp-format\" srcset=\"https:\/\/opensource.microsoft.com\/blog\/wp-content\/uploads\/2019\/04\/Github-pages-7.webp 2582w, https:\/\/opensource.microsoft.com\/blog\/wp-content\/uploads\/2019\/04\/Github-pages-7-300x198.webp 300w, https:\/\/opensource.microsoft.com\/blog\/wp-content\/uploads\/2019\/04\/Github-pages-7-1024x676.webp 1024w, https:\/\/opensource.microsoft.com\/blog\/wp-content\/uploads\/2019\/04\/Github-pages-7-768x507.webp 768w, https:\/\/opensource.microsoft.com\/blog\/wp-content\/uploads\/2019\/04\/Github-pages-7-1536x1014.webp 1536w, https:\/\/opensource.microsoft.com\/blog\/wp-content\/uploads\/2019\/04\/Github-pages-7-2048x1352.webp 2048w, https:\/\/opensource.microsoft.com\/blog\/wp-content\/uploads\/2019\/04\/Github-pages-7-330x218.webp 330w, https:\/\/opensource.microsoft.com\/blog\/wp-content\/uploads\/2019\/04\/Github-pages-7-800x528.webp 800w, https:\/\/opensource.microsoft.com\/blog\/wp-content\/uploads\/2019\/04\/Github-pages-7-400x264.webp 400w\" data-orig-src=\"https:\/\/opensource.microsoft.com\/blog\/wp-content\/uploads\/2019\/04\/Github-pages-7.png\" data-orig-srcset=\"https:\/\/opensource.microsoft.com\/blog\/wp-content\/uploads\/2019\/04\/Github-pages-7.png 2582w, https:\/\/opensource.microsoft.com\/blog\/wp-content\/uploads\/2019\/04\/Github-pages-7-300x198.png 300w, https:\/\/opensource.microsoft.com\/blog\/wp-content\/uploads\/2019\/04\/Github-pages-7-1024x676.png 1024w, https:\/\/opensource.microsoft.com\/blog\/wp-content\/uploads\/2019\/04\/Github-pages-7-768x507.png 768w, https:\/\/opensource.microsoft.com\/blog\/wp-content\/uploads\/2019\/04\/Github-pages-7-1536x1014.png 1536w, https:\/\/opensource.microsoft.com\/blog\/wp-content\/uploads\/2019\/04\/Github-pages-7-2048x1352.png 2048w, https:\/\/opensource.microsoft.com\/blog\/wp-content\/uploads\/2019\/04\/Github-pages-7-330x218.png 330w, https:\/\/opensource.microsoft.com\/blog\/wp-content\/uploads\/2019\/04\/Github-pages-7-800x528.png 800w, https:\/\/opensource.microsoft.com\/blog\/wp-content\/uploads\/2019\/04\/Github-pages-7-400x264.png 400w\"><\/figure>\n\n\n\n<p>5. Go back to GitHub and use the web editor to change files in the&nbsp;<em>\/src<\/em>&nbsp;folder. Start a PR. The pipeline will run, but it will skip the step to push the built content to GitHub.<\/p>\n\n\n<figure class=\"wp-block-image aligncenter\"><img decoding=\"async\" alt=\"a screenshot of a cell phone\" src=\"https:\/\/opensource.microsoft.com\/blog\/wp-content\/uploads\/2019\/04\/Github-pages-8-1024x676.webp\" alt='\"5. Go back to GitHub and use the web editor to change files in the \/src directory\" screenshot' class=\"wp-image-76384 webp-format\" srcset=\"https:\/\/opensource.microsoft.com\/blog\/wp-content\/uploads\/2019\/04\/Github-pages-8.webp 2582w, https:\/\/opensource.microsoft.com\/blog\/wp-content\/uploads\/2019\/04\/Github-pages-8-300x198.webp 300w, https:\/\/opensource.microsoft.com\/blog\/wp-content\/uploads\/2019\/04\/Github-pages-8-1024x676.webp 1024w, https:\/\/opensource.microsoft.com\/blog\/wp-content\/uploads\/2019\/04\/Github-pages-8-768x507.webp 768w, https:\/\/opensource.microsoft.com\/blog\/wp-content\/uploads\/2019\/04\/Github-pages-8-1536x1014.webp 1536w, https:\/\/opensource.microsoft.com\/blog\/wp-content\/uploads\/2019\/04\/Github-pages-8-2048x1352.webp 2048w, https:\/\/opensource.microsoft.com\/blog\/wp-content\/uploads\/2019\/04\/Github-pages-8-330x218.webp 330w, https:\/\/opensource.microsoft.com\/blog\/wp-content\/uploads\/2019\/04\/Github-pages-8-800x528.webp 800w, https:\/\/opensource.microsoft.com\/blog\/wp-content\/uploads\/2019\/04\/Github-pages-8-400x264.webp 400w\" data-orig-alt=\"a screenshot of a cell phone\" src=\"https:\/\/opensource.microsoft.com\/blog\/wp-content\/uploads\/2019\/04\/Github-pages-8.png\" data-orig-srcset=\"https:\/\/opensource.microsoft.com\/blog\/wp-content\/uploads\/2019\/04\/Github-pages-8.png 2582w, https:\/\/opensource.microsoft.com\/blog\/wp-content\/uploads\/2019\/04\/Github-pages-8-300x198.png 300w, https:\/\/opensource.microsoft.com\/blog\/wp-content\/uploads\/2019\/04\/Github-pages-8-1024x676.png 1024w, https:\/\/opensource.microsoft.com\/blog\/wp-content\/uploads\/2019\/04\/Github-pages-8-768x507.png 768w, https:\/\/opensource.microsoft.com\/blog\/wp-content\/uploads\/2019\/04\/Github-pages-8-1536x1014.png 1536w, https:\/\/opensource.microsoft.com\/blog\/wp-content\/uploads\/2019\/04\/Github-pages-8-2048x1352.png 2048w, https:\/\/opensource.microsoft.com\/blog\/wp-content\/uploads\/2019\/04\/Github-pages-8-330x218.png 330w, https:\/\/opensource.microsoft.com\/blog\/wp-content\/uploads\/2019\/04\/Github-pages-8-800x528.png 800w, https:\/\/opensource.microsoft.com\/blog\/wp-content\/uploads\/2019\/04\/Github-pages-8-400x264.png 400w\"><\/figure>\n\n\n\n<p>6. Complete the PR. The pipeline will run again, this time as a continuous integration trigger to master. The resulting content will be automatically pushed back to master and ultimately deployed on GitHub Pages!<\/p>\n\n\n\n<p>Questions or feedback? Let us know in the comments.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Do you work on or maintain a project for technical users? A key part of attracting users, especially to an open source project, is publishing great documentation. However, keeping it up to date as your APIs and concepts change can be challenging or just time-consuming.<\/p>\n","protected":false},"author":5562,"featured_media":76378,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"msxcm_post_with_no_image":false,"ep_exclude_from_search":false,"_classifai_error":"","_classifai_text_to_speech_error":"","footnotes":""},"post_tag":[],"content-type":[340],"topic":[2240,2241,2244],"programming-languages":[],"coauthors":[553],"class_list":["post-76351","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","content-type-tutorials-and-demos","topic-application-development","topic-cloud","topic-devops","review-flag-1593580428-734","review-flag-1593580415-931","review-flag-1593580771-946","review-flag-1-1593580432-963","review-flag-4-1593580448-609","review-flag-5-1593580453-725","review-flag-6-1593580457-852","review-flag-8-1593580468-572","review-flag-never-1593580314-283"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.2 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Publishing GitHub Pages from Azure Pipelines | Microsoft Open Source Blog<\/title>\n<meta name=\"description\" content=\"Once you&#039;ve built the HTML, where do you publish it? For open source projects on GitHub, a seemingly obvious choice is GitHub Pages. In the post, Matt walks through building and publishing GitHub Pages using Azure Pipelines\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/opensource.microsoft.com\/blog\/2019\/04\/05\/publishing-github-pages-from-azure-pipelines\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Publishing GitHub Pages from Azure Pipelines | Microsoft Open Source Blog\" \/>\n<meta property=\"og:description\" content=\"Once you&#039;ve built the HTML, where do you publish it? For open source projects on GitHub, a seemingly obvious choice is GitHub Pages. In the post, Matt walks through building and publishing GitHub Pages using Azure Pipelines\" \/>\n<meta property=\"og:url\" content=\"https:\/\/opensource.microsoft.com\/blog\/2019\/04\/05\/publishing-github-pages-from-azure-pipelines\/\" \/>\n<meta property=\"og:site_name\" content=\"Microsoft Open Source Blog\" \/>\n<meta property=\"article:published_time\" content=\"2019-04-05T17:50:56+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-06-27T16:21:44+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/opensource.microsoft.com\/blog\/wp-content\/uploads\/2019\/04\/Github-pages-6.png\" \/>\n\t<meta property=\"og:image:width\" content=\"2582\" \/>\n\t<meta property=\"og:image:height\" content=\"1704\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Matt Cooper\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@OpenAtMicrosoft\" \/>\n<meta name=\"twitter:site\" content=\"@OpenAtMicrosoft\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Matt Cooper\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"5 min read\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/opensource.microsoft.com\/blog\/2019\/04\/05\/publishing-github-pages-from-azure-pipelines\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/opensource.microsoft.com\/blog\/2019\/04\/05\/publishing-github-pages-from-azure-pipelines\/\"},\"author\":[{\"@id\":\"https:\/\/opensource.microsoft.com\/blog\/author\/matt-cooper\/\",\"@type\":\"Person\",\"@name\":\"Matt Cooper\"}],\"headline\":\"Publishing GitHub Pages from Azure Pipelines\",\"datePublished\":\"2019-04-05T17:50:56+00:00\",\"dateModified\":\"2025-06-27T16:21:44+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/opensource.microsoft.com\/blog\/2019\/04\/05\/publishing-github-pages-from-azure-pipelines\/\"},\"wordCount\":1042,\"commentCount\":2,\"publisher\":{\"@id\":\"https:\/\/opensource.microsoft.com\/blog\/#organization\"},\"image\":{\"@id\":\"https:\/\/opensource.microsoft.com\/blog\/2019\/04\/05\/publishing-github-pages-from-azure-pipelines\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/opensource.microsoft.com\/blog\/wp-content\/uploads\/2019\/04\/Github-pages-6.png\",\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/opensource.microsoft.com\/blog\/2019\/04\/05\/publishing-github-pages-from-azure-pipelines\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/opensource.microsoft.com\/blog\/2019\/04\/05\/publishing-github-pages-from-azure-pipelines\/\",\"url\":\"https:\/\/opensource.microsoft.com\/blog\/2019\/04\/05\/publishing-github-pages-from-azure-pipelines\/\",\"name\":\"Publishing GitHub Pages from Azure Pipelines | Microsoft Open Source Blog\",\"isPartOf\":{\"@id\":\"https:\/\/opensource.microsoft.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/opensource.microsoft.com\/blog\/2019\/04\/05\/publishing-github-pages-from-azure-pipelines\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/opensource.microsoft.com\/blog\/2019\/04\/05\/publishing-github-pages-from-azure-pipelines\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/opensource.microsoft.com\/blog\/wp-content\/uploads\/2019\/04\/Github-pages-6.png\",\"datePublished\":\"2019-04-05T17:50:56+00:00\",\"dateModified\":\"2025-06-27T16:21:44+00:00\",\"description\":\"Once you've built the HTML, where do you publish it? For open source projects on GitHub, a seemingly obvious choice is GitHub Pages. In the post, Matt walks through building and publishing GitHub Pages using Azure Pipelines\",\"breadcrumb\":{\"@id\":\"https:\/\/opensource.microsoft.com\/blog\/2019\/04\/05\/publishing-github-pages-from-azure-pipelines\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/opensource.microsoft.com\/blog\/2019\/04\/05\/publishing-github-pages-from-azure-pipelines\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/opensource.microsoft.com\/blog\/2019\/04\/05\/publishing-github-pages-from-azure-pipelines\/#primaryimage\",\"url\":\"https:\/\/opensource.microsoft.com\/blog\/wp-content\/uploads\/2019\/04\/Github-pages-6.png\",\"contentUrl\":\"https:\/\/opensource.microsoft.com\/blog\/wp-content\/uploads\/2019\/04\/Github-pages-6.png\",\"width\":2582,\"height\":1704,\"caption\":\"a screenshot of a computer screen\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/opensource.microsoft.com\/blog\/2019\/04\/05\/publishing-github-pages-from-azure-pipelines\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/opensource.microsoft.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Publishing GitHub Pages from Azure Pipelines\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/opensource.microsoft.com\/blog\/#website\",\"url\":\"https:\/\/opensource.microsoft.com\/blog\/\",\"name\":\"Microsoft Open Source Blog\",\"description\":\"Open dialogue about openness at Microsoft \u2013 open source, standards, interoperability\",\"publisher\":{\"@id\":\"https:\/\/opensource.microsoft.com\/blog\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/opensource.microsoft.com\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/opensource.microsoft.com\/blog\/#organization\",\"name\":\"Microsoft Open Source Blog\",\"url\":\"https:\/\/opensource.microsoft.com\/blog\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/opensource.microsoft.com\/blog\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/opensource.microsoft.com\/blog\/wp-content\/uploads\/2019\/08\/Microsoft-Logo.png\",\"contentUrl\":\"https:\/\/opensource.microsoft.com\/blog\/wp-content\/uploads\/2019\/08\/Microsoft-Logo.png\",\"width\":259,\"height\":194,\"caption\":\"Microsoft Open Source Blog\"},\"image\":{\"@id\":\"https:\/\/opensource.microsoft.com\/blog\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/x.com\/OpenAtMicrosoft\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Publishing GitHub Pages from Azure Pipelines | Microsoft Open Source Blog","description":"Once you've built the HTML, where do you publish it? For open source projects on GitHub, a seemingly obvious choice is GitHub Pages. In the post, Matt walks through building and publishing GitHub Pages using Azure Pipelines","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/opensource.microsoft.com\/blog\/2019\/04\/05\/publishing-github-pages-from-azure-pipelines\/","og_locale":"en_US","og_type":"article","og_title":"Publishing GitHub Pages from Azure Pipelines | Microsoft Open Source Blog","og_description":"Once you've built the HTML, where do you publish it? For open source projects on GitHub, a seemingly obvious choice is GitHub Pages. In the post, Matt walks through building and publishing GitHub Pages using Azure Pipelines","og_url":"https:\/\/opensource.microsoft.com\/blog\/2019\/04\/05\/publishing-github-pages-from-azure-pipelines\/","og_site_name":"Microsoft Open Source Blog","article_published_time":"2019-04-05T17:50:56+00:00","article_modified_time":"2025-06-27T16:21:44+00:00","og_image":[{"width":2582,"height":1704,"url":"https:\/\/opensource.microsoft.com\/blog\/wp-content\/uploads\/2019\/04\/Github-pages-6.png","type":"image\/png"}],"author":"Matt Cooper","twitter_card":"summary_large_image","twitter_creator":"@OpenAtMicrosoft","twitter_site":"@OpenAtMicrosoft","twitter_misc":{"Written by":"Matt Cooper","Est. reading time":"5 min read"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/opensource.microsoft.com\/blog\/2019\/04\/05\/publishing-github-pages-from-azure-pipelines\/#article","isPartOf":{"@id":"https:\/\/opensource.microsoft.com\/blog\/2019\/04\/05\/publishing-github-pages-from-azure-pipelines\/"},"author":[{"@id":"https:\/\/opensource.microsoft.com\/blog\/author\/matt-cooper\/","@type":"Person","@name":"Matt Cooper"}],"headline":"Publishing GitHub Pages from Azure Pipelines","datePublished":"2019-04-05T17:50:56+00:00","dateModified":"2025-06-27T16:21:44+00:00","mainEntityOfPage":{"@id":"https:\/\/opensource.microsoft.com\/blog\/2019\/04\/05\/publishing-github-pages-from-azure-pipelines\/"},"wordCount":1042,"commentCount":2,"publisher":{"@id":"https:\/\/opensource.microsoft.com\/blog\/#organization"},"image":{"@id":"https:\/\/opensource.microsoft.com\/blog\/2019\/04\/05\/publishing-github-pages-from-azure-pipelines\/#primaryimage"},"thumbnailUrl":"https:\/\/opensource.microsoft.com\/blog\/wp-content\/uploads\/2019\/04\/Github-pages-6.png","inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/opensource.microsoft.com\/blog\/2019\/04\/05\/publishing-github-pages-from-azure-pipelines\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/opensource.microsoft.com\/blog\/2019\/04\/05\/publishing-github-pages-from-azure-pipelines\/","url":"https:\/\/opensource.microsoft.com\/blog\/2019\/04\/05\/publishing-github-pages-from-azure-pipelines\/","name":"Publishing GitHub Pages from Azure Pipelines | Microsoft Open Source Blog","isPartOf":{"@id":"https:\/\/opensource.microsoft.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/opensource.microsoft.com\/blog\/2019\/04\/05\/publishing-github-pages-from-azure-pipelines\/#primaryimage"},"image":{"@id":"https:\/\/opensource.microsoft.com\/blog\/2019\/04\/05\/publishing-github-pages-from-azure-pipelines\/#primaryimage"},"thumbnailUrl":"https:\/\/opensource.microsoft.com\/blog\/wp-content\/uploads\/2019\/04\/Github-pages-6.png","datePublished":"2019-04-05T17:50:56+00:00","dateModified":"2025-06-27T16:21:44+00:00","description":"Once you've built the HTML, where do you publish it? For open source projects on GitHub, a seemingly obvious choice is GitHub Pages. In the post, Matt walks through building and publishing GitHub Pages using Azure Pipelines","breadcrumb":{"@id":"https:\/\/opensource.microsoft.com\/blog\/2019\/04\/05\/publishing-github-pages-from-azure-pipelines\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/opensource.microsoft.com\/blog\/2019\/04\/05\/publishing-github-pages-from-azure-pipelines\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/opensource.microsoft.com\/blog\/2019\/04\/05\/publishing-github-pages-from-azure-pipelines\/#primaryimage","url":"https:\/\/opensource.microsoft.com\/blog\/wp-content\/uploads\/2019\/04\/Github-pages-6.png","contentUrl":"https:\/\/opensource.microsoft.com\/blog\/wp-content\/uploads\/2019\/04\/Github-pages-6.png","width":2582,"height":1704,"caption":"a screenshot of a computer screen"},{"@type":"BreadcrumbList","@id":"https:\/\/opensource.microsoft.com\/blog\/2019\/04\/05\/publishing-github-pages-from-azure-pipelines\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/opensource.microsoft.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Publishing GitHub Pages from Azure Pipelines"}]},{"@type":"WebSite","@id":"https:\/\/opensource.microsoft.com\/blog\/#website","url":"https:\/\/opensource.microsoft.com\/blog\/","name":"Microsoft Open Source Blog","description":"Open dialogue about openness at Microsoft \u2013 open source, standards, interoperability","publisher":{"@id":"https:\/\/opensource.microsoft.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/opensource.microsoft.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/opensource.microsoft.com\/blog\/#organization","name":"Microsoft Open Source Blog","url":"https:\/\/opensource.microsoft.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/opensource.microsoft.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/opensource.microsoft.com\/blog\/wp-content\/uploads\/2019\/08\/Microsoft-Logo.png","contentUrl":"https:\/\/opensource.microsoft.com\/blog\/wp-content\/uploads\/2019\/08\/Microsoft-Logo.png","width":259,"height":194,"caption":"Microsoft Open Source Blog"},"image":{"@id":"https:\/\/opensource.microsoft.com\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/x.com\/OpenAtMicrosoft"]}]}},"msxcm_display_generated_audio":false,"msxcm_animated_featured_image":null,"distributor_meta":false,"distributor_terms":false,"distributor_media":false,"distributor_original_site_name":"Microsoft Open Source Blog","distributor_original_site_url":"https:\/\/opensource.microsoft.com\/blog","push-errors":false,"_links":{"self":[{"href":"https:\/\/opensource.microsoft.com\/blog\/wp-json\/wp\/v2\/posts\/76351","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/opensource.microsoft.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/opensource.microsoft.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/opensource.microsoft.com\/blog\/wp-json\/wp\/v2\/users\/5562"}],"replies":[{"embeddable":true,"href":"https:\/\/opensource.microsoft.com\/blog\/wp-json\/wp\/v2\/comments?post=76351"}],"version-history":[{"count":6,"href":"https:\/\/opensource.microsoft.com\/blog\/wp-json\/wp\/v2\/posts\/76351\/revisions"}],"predecessor-version":[{"id":97779,"href":"https:\/\/opensource.microsoft.com\/blog\/wp-json\/wp\/v2\/posts\/76351\/revisions\/97779"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/opensource.microsoft.com\/blog\/wp-json\/wp\/v2\/media\/76378"}],"wp:attachment":[{"href":"https:\/\/opensource.microsoft.com\/blog\/wp-json\/wp\/v2\/media?parent=76351"}],"wp:term":[{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/opensource.microsoft.com\/blog\/wp-json\/wp\/v2\/post_tag?post=76351"},{"taxonomy":"content-type","embeddable":true,"href":"https:\/\/opensource.microsoft.com\/blog\/wp-json\/wp\/v2\/content-type?post=76351"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/opensource.microsoft.com\/blog\/wp-json\/wp\/v2\/topic?post=76351"},{"taxonomy":"programming-languages","embeddable":true,"href":"https:\/\/opensource.microsoft.com\/blog\/wp-json\/wp\/v2\/programming-languages?post=76351"},{"taxonomy":"author","embeddable":true,"href":"https:\/\/opensource.microsoft.com\/blog\/wp-json\/wp\/v2\/coauthors?post=76351"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}