-
Notifications
You must be signed in to change notification settings - Fork 20
45 lines (38 loc) · 1013 Bytes
/
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
name: Generate docs
on:
workflow_dispatch:
push:
paths:
- "lib/**"
- "doc/**"
- "README.md"
- "dartdoc_options.yaml"
branches: [main]
jobs:
generate-docs:
if: github.repository_owner == 'viamrobotics'
runs-on: ubuntu-latest
container:
image: ghcr.io/cirruslabs/flutter:latest
steps:
- name: Checkout Code
uses: actions/checkout@v4
- name: Setup Flutter
run: flutter pub get
- name: Generate docs
run: dart doc
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
if: github.ref == 'refs/heads/main'
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: doc/api
publish_branch: docs-gh_pages
cname: flutter.viam.dev
- name: Zip artifacts
run: zip html-docs.zip ./doc/api -r
- name: Upload artifacts
uses: actions/upload-artifact@v3
with:
name: html-docs
path: html-docs.zip