-
Notifications
You must be signed in to change notification settings - Fork 183
84 lines (72 loc) · 2.09 KB
/
build-docs.yml
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
76
77
78
79
80
81
82
83
84
# deploys a preview version of the frontend including example changes
name: Preview Docs
on:
push:
branches:
- main
- build-docs
pull_request:
workflow_dispatch:
jobs:
build-preview:
name: Build and deploy preview
runs-on: ubuntu-20.04
env:
MODAL_TOKEN_ID: ${{ secrets.MODAL_MODAL_LABS_TOKEN_ID }}
MODAL_TOKEN_SECRET: ${{ secrets.MODAL_MODAL_LABS_TOKEN_SECRET }}
MODAL_ENVIRONMENT: examples
steps:
- name: Checkout modal repo
uses: actions/checkout@v3
with:
repository: modal-labs/modal
token: ${{ secrets.GH_PAT }}
fetch-depth: 1
path: modal
persist-credentials: false
ref: charlesfrye/skip-update-docs
- name: Install Python
uses: actions/setup-python@v5
with:
python-version: "3.11"
- name: Install base packages
shell: bash
run: |
pip install uv
uv pip install --system setuptools wheel
- name: Install modal development packages
run: |
uv pip install --system -r modal/requirements.dev.txt
- name: Checkout client repo
uses: actions/checkout@v3
with:
repository: modal-labs/modal-client
token: ${{ secrets.GH_PAT }}
path: client
fetch-depth: 1
persist-credentials: false
- name: Install client repo
run: |
uv pip install --system -e client
- name: Install node
uses: actions/setup-node@v4
with:
node-version: 18
- name: Install node packages
run: npm ci --include=dev
working-directory: modal/frontend
- name: Compile protos
run: |
cd client
inv protoc type-stubs
cd ../modal
inv protoc
- name: Checkout examples repo
uses: actions/checkout@v3
with:
fetch-depth: 1
path: modal/examples
- name: Build the docs
working-directory: modal
run: |
inv frontend-preview --skip-update --deployment-id ${GITHUB_SHA::7}