-
Notifications
You must be signed in to change notification settings - Fork 1
76 lines (65 loc) · 1.9 KB
/
docs.yml
File metadata and controls
76 lines (65 loc) · 1.9 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
76
name: Documentation
on:
pull_request:
paths:
- 'docs/**'
- 'packages/dataset_config_dart/**'
- 'tool/**'
- '.github/workflows/docs.yml'
push:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v6
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: '3.13'
- name: Set up Flutter
uses: subosito/flutter-action@1a449444c387b1966244ae4d4f8c696479add0b2
with:
channel: stable
- name: Install Python dependencies
run: |
pip install --upgrade pip
pip install -r docs/requirements.txt
pip install -e packages/dataset_config_python
pip install -e packages/dash_evals
- name: Install Dart dependencies
run: |
flutter pub get
cd tool/dartdoc_to_md && dart pub get
- name: Build documentation
working-directory: docs
run: make html
- name: Upload build artifact
uses: actions/upload-artifact@v7
with:
name: docs-html
path: docs/_build/html
retention-days: 1
deploy:
# Only deploy on push to main
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
needs: build
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v6
- name: Download build artifact
uses: actions/download-artifact@v8
with:
name: docs-html
path: docs/_build/html
- name: Deploy to Firebase Hosting
uses: FirebaseExtended/action-hosting-deploy@v0
with:
repoToken: ${{ secrets.GITHUB_TOKEN }}
firebaseServiceAccount: ${{ secrets.FIREBASE_SERVICE_ACCOUNT }}
projectId: dash-evals
target: dash-evals-docs
channelId: live