Skip to content
refresh-cw

GitHub Action

Deploy Docusaurus to Azure

1.0.0 Latest version

Deploy Docusaurus to Azure

refresh-cw

Deploy Docusaurus to Azure

Builds and syncs Docusaurus site to Azure

Installation

Copy and paste the following snippet into your .yml file.

              

- name: Deploy Docusaurus to Azure

uses: brockneedscoffee/[email protected]

Learn more about this action in brockneedscoffee/deploy-docusaurus-to-azure

Choose a version

Deploy Docusaurus to Azure Static Website

This is a GitHub Action to easily deploy Docusaurus to an Azure Storage account that is configured to host a static site. It uses the Azure CLI to login with a service principal set in your repo secrets to build and upload the site to the storage account you set.

Usage

main.yml Example

Place in a .yml file such as this one in your .github/workflows folder. Refer to the documentation on workflow YAML syntax here.

name: CI
on: [push]

jobs:
  deploy:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@main
      - uses: brockneedscoffee/[email protected]
        env:
          AZURE_SP_APP_ID: ${{ secrets.AZURE_SP_APP_ID }}
          AZURE_SP_PW: ${{ secrets.AZURE_SP_PW }}
          AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }}
          STORAGE_ACCOUNT_NAME: ${{ secrets.STORAGE_ACCOUNT_NAME }}

Configuration

The following settings must be passed as environment variables as shown in the example. Sensitive information should be set as encrypted secrets — otherwise, they'll be public to anyone browsing your repository's source code and CI logs.

Key Value Suggested Type Required Notes
AZURE_SP_APP_ID The Azure Service Principal App Id, this is generated when you create it secret env Yes
AZURE_SP_PW The Service Principal password secret env Yes
AZURE_TENANT_ID Azure Tenant ID secret env Yes
STORAGE_ACCOUNT_NAME Storage account name secret env Yes