Skip to content

Commit a9d3279

Browse files
authored
Adding a staging skill (#13166)
As it says
1 parent 2d8829e commit a9d3279

1 file changed

Lines changed: 49 additions & 0 deletions

File tree

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
---
2+
name: validate-pr
3+
description: >-
4+
Stages the Flutter site locally. This includes checking for broken links,
5+
verifying excerpts, updating formatting, and serving the dev site.
6+
---
7+
8+
# Stage the Flutter site
9+
10+
Before committing changes or reviewing a PR locally,
11+
it is important to stage the site and ensure everything works correctly.
12+
Follow these steps to stage the site:
13+
14+
## 1. Sync code excerpts
15+
16+
Ensure that any changed code excerpts are properly run and synced to the
17+
Markdown files:
18+
19+
```bash
20+
dart run dash_site refresh-excerpts
21+
```
22+
23+
## 2. Update formatting
24+
25+
Update the formatting of the site examples and tools to ensure
26+
they follow the official Dart format:
27+
28+
```bash
29+
dart run dash_site format-dart
30+
```
31+
32+
## 3. Check for broken links
33+
34+
Run the following command to check for any unlinked or broken
35+
Markdown link references in the site output:
36+
37+
```bash
38+
dart run dash_site check-link-references
39+
```
40+
41+
If any broken links are found, try to patch them or alert the user.
42+
43+
## 4. Stage the site locally
44+
45+
Finally, serve a local development server of the site so the user can preview the changes:
46+
47+
```bash
48+
dart run dash_site serve
49+
```

0 commit comments

Comments
 (0)