-
Notifications
You must be signed in to change notification settings - Fork 17
90 lines (71 loc) · 1.95 KB
/
gh-pages-deploy.yaml
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
85
86
87
88
89
90
name: Build and Deploy documentation to GitHub Pages
on:
push:
branches:
- master
permissions:
contents: write
jobs:
build:
name: Generate docs content
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Setup Flutter
uses: subosito/flutter-action@v2
with:
channel: 'stable'
- name: Install Dependencies
run: dart pub get
- name: Generate documentation files
run: >
dart run tool/generate_web_docs_content.dart
--path lib/src/lints
--docs-dir doc/docusaurus/docs/2_custom_lints
--readme README.md
- name: Create generated docs artifact
uses: actions/upload-artifact@v4
with:
name: generated-docs
path: doc/docusaurus/docs
deploy:
needs: build
name: Deploy to GitHub Pages
runs-on: ubuntu-latest
defaults:
run:
working-directory: doc/docusaurus
permissions:
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-node@v4
with:
node-version: 18
cache: yarn
cache-dependency-path: doc/docusaurus/yarn.lock
- name: Install dependencies
run: yarn install --frozen-lockfile
- name: Download generated docs
uses: actions/download-artifact@v4
with:
name: generated-docs
path: doc/docusaurus/docs
- name: Build website
run: yarn build
- name: Setup Pages
uses: actions/configure-pages@v3
- name: Upload Artifact
uses: actions/upload-pages-artifact@v1
with:
path: doc/docusaurus/build
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v2