Merge branch 'dev' #17
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Deploy Docusaurus to Azure Web App | |
on: | |
push: | |
branches: [ main ] # Trigger on push to main branch | |
workflow_dispatch: # Also allow manual trigger from GitHub UI | |
env: | |
AZURE_WEBAPP_NAME: product-docs-dev # Replace with your Azure Web App name | |
NODE_VERSION: '20.x' # Node version for Docusaurus build | |
jobs: | |
build-and-deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Set up Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: ${{ env.NODE_VERSION }} | |
cache: 'npm' | |
- name: Install dependencies | |
run: npm ci | |
- name: Build Docusaurus site | |
run: npm run build | |
- name: Deploy to Azure Web App | |
uses: azure/webapps-deploy@v2 | |
with: | |
app-name: ${{ env.AZURE_WEBAPP_NAME }} | |
publish-profile: ${{ secrets.AZURE_WEBAPP_PUBLISH_PROFILE }} | |
package: build # Only deploy the built output folder |