Skip to content

Commit 3b45f28

Browse files
authored
ci: Add workflow to publish docs (#918)
1 parent 4f907c6 commit 3b45f28

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: release-manual-docs
2+
on:
3+
workflow_dispatch:
4+
inputs:
5+
tag:
6+
default: ''
7+
description: 'Version tag (dart-#.#.# or flutter-#.#.#):'
8+
env:
9+
package: ${{ startsWith(github.event.inputs.tag, 'dart') && 'dart' || 'flutter' }}
10+
jobs:
11+
docs-publish:
12+
if: github.event.inputs.tag != ''
13+
runs-on: ubuntu-latest
14+
timeout-minutes: 15
15+
steps:
16+
- uses: actions/checkout@v3
17+
with:
18+
ref: ${{ github.event.inputs.tag }}
19+
- name: Setup dart
20+
uses: dart-lang/setup-dart@v1
21+
- name: Generate Docs
22+
run: |
23+
dart doc ./packages/${{ env.package }}/ -o ./.api_docs/${{ env.package }}/
24+
- name: Deploy
25+
uses: peaceiris/[email protected]
26+
with:
27+
github_token: ${{ secrets.GITHUB_TOKEN }}
28+
publish_dir: ./.api_docs/
29+
destination_dir: ${{ env.package }}

0 commit comments

Comments
 (0)