Files
oh-my-posh/.github/workflows/docs.yml
T
168ae17860 ci(website): validate docs build in pull requests
Catch broken Docusaurus links before website changes merge.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
2026-08-05 15:44:47 +02:00

76 lines
2.4 KiB
YAML

name: Azure Static Web Apps CI/CD
on:
pull_request:
paths:
- "website/**"
- "themes/**"
- ".github/workflows/docs.yml"
push:
branches:
- main
paths:
- "website/**"
- "themes/**"
workflow_dispatch:
permissions:
contents: read
jobs:
build_and_deploy:
runs-on: ubuntu-latest
name: Build and Deploy
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1
with:
submodules: true
persist-credentials: false
- name: Install Go 🗳
uses: ./.github/workflows/composite/bootstrap-go
- name: Setup Node.js
uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020
with:
node-version: 20.9.0
- name: Build oh-my-posh 🔧
run: |
cd src
go build -o ./bin/oh-my-posh
cd ..
- name: Render themes 🎨
run: |
export PATH="$PWD/src/bin:$PATH"
cd website
npm install
npm run themes
cd ..
- name: Render segment previews 🔎
run: |
export PATH="$PWD/src/bin:$PATH"
cd website
npm run segment-previews
cd ..
- name: Build studio wasm module 🧩
run: |
cd website
npm run wasm
cd ..
- name: Copy schema for MCP validator 📋
run: |
mkdir -p website/api/data
cp themes/schema.json website/api/data/schema.json
echo "✅ Copied schema.json to website/api/data/"
- name: Build Docs And Deploy 🚀
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
id: builddeploy
uses: Azure/static-web-apps-deploy@1a947af9992250f3bc2e68ad0754c0b0c11566c9
with:
azure_static_web_apps_api_token: ${{ secrets.AZURE_STATIC_WEB_APPS_API_TOKEN_ASHY_MEADOW_063E9BA03 }}
repo_token: ${{ secrets.GITHUB_TOKEN }} # Used for GitHub integrations (i.e. PR comments)
action: "upload"
###### Repository/Build Configurations - These values can be configured to match your app requirements. ######
# For more information regarding Static Web App workflow configurations, please visit: https://aka.ms/swaworkflowconfig
app_location: "/website" # App source code path
api_location: "/website/api" # Api source code path - optional
output_location: "build" # Built app content directory - optional