-
Notifications
You must be signed in to change notification settings - Fork 48
62 lines (51 loc) · 1.6 KB
/
Copy pathdeploy-docs.yml
File metadata and controls
62 lines (51 loc) · 1.6 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
name: Deploy docs
# Builds the docs site and deploys to Azure Static Web Apps on every push
# to the `release` branch.
#
# Required repo secrets:
# SWA_TOKEN Azure Static Web Apps deployment token
# UMAMI_WEBSITE_ID Analytics site ID baked into the docs build
#
# Required repo variable:
# SWA_ENV SWA environment name (leave unset for production)
on:
push:
branches: ["release"]
workflow_dispatch:
permissions:
contents: read
jobs:
deploy-docs:
name: Build and deploy docs
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
submodules: true
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: 22
- name: Enable Corepack
run: npm i -g corepack@latest
- name: Install pnpm
run: corepack prepare
- name: Install dependencies
run: pnpm install --frozen-lockfile
# SDK must build first so TypeDoc can read its compiled types.
- name: Build SDK
run: pnpm --filter @workflowbuilder/sdk build:lib
- name: Build docs
run: pnpm --filter @workflow-builder/docs build
env:
UMAMI_WEBSITE_ID: ${{ secrets.UMAMI_WEBSITE_ID }}
- name: Deploy to Azure Static Web Apps
uses: Azure/static-web-apps-deploy@v1
with:
azure_static_web_apps_api_token: ${{ secrets.SWA_TOKEN }}
action: "upload"
app_location: "apps/docs/dist"
skip_app_build: true
skip_api_build: true
deployment_environment: ${{ vars.SWA_ENV }}