-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
75 lines (72 loc) · 2.45 KB
/
Copy pathdocs.yml
File metadata and controls
75 lines (72 loc) · 2.45 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
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