Skip to content

Commit 0534c5a

Browse files
authored
[sync] 2026/06/22 (#1625)
2 parents 983eca6 + 883eeb3 commit 0534c5a

1,238 files changed

Lines changed: 36819 additions & 4256 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/codeql-analysis.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,11 @@ jobs:
2929

3030
steps:
3131
- name: Checkout repository
32-
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd
32+
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0
3333

3434
# Initializes the CodeQL tools for scanning.
3535
- name: Initialize CodeQL
36-
uses: github/codeql-action/init@7211b7c8077ea37d8641b6271f6a365a22a5fbfa
36+
uses: github/codeql-action/init@8aad20d150bbac5944a9f9d289da16a4b0d87c1e
3737
with:
3838
languages: ${{ matrix.language }}
3939
# If you wish to specify custom queries, you can do so here or in a config file.
@@ -44,7 +44,7 @@ jobs:
4444
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
4545
# If this step fails, then you should remove it and run the build manually (see below)
4646
- name: Autobuild
47-
uses: github/codeql-action/autobuild@7211b7c8077ea37d8641b6271f6a365a22a5fbfa
47+
uses: github/codeql-action/autobuild@8aad20d150bbac5944a9f9d289da16a4b0d87c1e
4848

4949
# ℹ️ Command-line programs to run using the OS shell.
5050
# 📚 https://git.io/JvXDl
@@ -58,4 +58,4 @@ jobs:
5858
# make release
5959

6060
- name: Perform CodeQL Analysis
61-
uses: github/codeql-action/analyze@7211b7c8077ea37d8641b6271f6a365a22a5fbfa
61+
uses: github/codeql-action/analyze@8aad20d150bbac5944a9f9d289da16a4b0d87c1e

.github/workflows/compile_host_redirect_js.yml renamed to .github/workflows/compile-host-redirect-js.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323
github.repository == 'cfug/flutter.cn'
2424
runs-on: ubuntu-latest
2525
steps:
26-
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd
26+
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0
2727
- uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e
2828
with:
2929
node-version: ${{ env.NODE_VERSION }}

.github/workflows/dart.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ jobs:
5252
experimental: true
5353
continue-on-error: ${{ matrix.experimental }}
5454
steps:
55-
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd
55+
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0
5656
- uses: subosito/flutter-action@e938fdf56512cc96ef2f93601a5a40bde3801046
5757
with:
5858
channel: ${{ matrix.branch }}
Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,17 @@ on:
44
pull_request:
55
branches:
66
- main
7+
paths:
8+
- 'sites/docs/**'
9+
- 'examples/**'
10+
- 'packages/excerpter/**'
11+
- 'firebase.json'
12+
- 'tool/dash_site/**'
13+
- 'tool/config/linkcheck-skip-list.txt'
14+
- 'pubspec.yaml'
15+
- 'pubspec.lock'
16+
- 'analysis_options.yaml'
17+
- '.github/workflows/docs.yml'
718

819
# Declare default permissions as read only.
920
permissions: read-all
@@ -18,7 +29,7 @@ jobs:
1829
if: |
1930
github.event.pull_request.head.repo.full_name == 'cfug/flutter.cn'
2031
steps:
21-
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd
32+
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0
2233
with:
2334
# docs.flutter.cn | https://github.com/cfug/flutter.cn/pull/1518
2435
fetch-depth: 0
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: translator_bot
1+
name: translator_bot (docs)
22

33
on:
44
issue_comment:

.github/workflows/docs.yml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
name: Docs site
22

33
on:
4+
workflow_dispatch:
45
push:
56
branches:
67
- main
@@ -45,7 +46,7 @@ jobs:
4546
if: github.repository == 'cfug/flutter.cn'
4647
timeout-minutes: 20
4748
steps:
48-
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd
49+
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0
4950
- uses: dart-lang/setup-dart@65eb853c7ba17dde3be364c3d2858773e7144260
5051
with:
5152
sdk: beta
@@ -60,7 +61,7 @@ jobs:
6061
if: github.repository == 'cfug/flutter.cn'
6162
timeout-minutes: 30
6263
steps:
63-
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd
64+
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0
6465
- uses: dart-lang/setup-dart@65eb853c7ba17dde3be364c3d2858773e7144260
6566
with:
6667
sdk: beta
@@ -87,7 +88,7 @@ jobs:
8788
if: github.repository == 'cfug/flutter.cn'
8889
timeout-minutes: 10
8990
steps:
90-
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd
91+
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0
9192
- uses: dart-lang/setup-dart@65eb853c7ba17dde3be364c3d2858773e7144260
9293
with:
9394
sdk: beta
@@ -105,7 +106,7 @@ jobs:
105106
github.ref == 'refs/heads/main' &&
106107
github.repository == 'cfug/flutter.cn'
107108
steps:
108-
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd
109+
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0
109110
with:
110111
# docs.flutter.cn | https://github.com/cfug/flutter.cn/pull/1518
111112
fetch-depth: 0
@@ -123,7 +124,7 @@ jobs:
123124
run: bash tool/translator/build.sh
124125
shell: bash
125126
- name: Deploy to production
126-
run: bash tool/translator/deploy-cn.sh
127+
run: bash tool/deploy/deploy-cn-docs.sh
127128
shell: bash
128129
env:
129130
DEPLOY_USER: ${{ secrets.DOCS_REPO_DEPLOY_USER }}

.github/workflows/www.yml

Lines changed: 97 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,97 @@
1+
name: Marketing site
2+
3+
on:
4+
workflow_dispatch:
5+
push:
6+
branches:
7+
- main
8+
paths:
9+
- 'sites/www/**'
10+
- 'tool/dash_site/**'
11+
- 'tool/config/linkcheck-skip-list.txt'
12+
- 'pubspec.yaml'
13+
- 'pubspec.lock'
14+
- 'analysis_options.yaml'
15+
- '.github/workflows/www.yml'
16+
pull_request:
17+
branches:
18+
- main
19+
paths:
20+
- 'sites/www/**'
21+
- 'tool/dash_site/**'
22+
- 'tool/config/linkcheck-skip-list.txt'
23+
- 'pubspec.yaml'
24+
- 'pubspec.lock'
25+
- 'analysis_options.yaml'
26+
- '.github/workflows/www.yml'
27+
# schedule:
28+
# - cron: '0 0 * * 0'
29+
30+
permissions: read-all
31+
32+
concurrency:
33+
group: ${{ github.workflow }}-${{ github.ref }}
34+
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
35+
36+
jobs:
37+
linkcheck:
38+
name: Build and check links
39+
runs-on: ubuntu-latest
40+
if: github.repository == 'cfug/flutter.cn'
41+
timeout-minutes: 30
42+
steps:
43+
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0
44+
- uses: dart-lang/setup-dart@65eb853c7ba17dde3be364c3d2858773e7144260
45+
with:
46+
sdk: beta
47+
- name: Fetch Dart dependencies
48+
run: dart pub get
49+
- name: Install firebase-tools
50+
run: curl -sL https://firebase.tools | bash
51+
- name: Build site
52+
run: dart run dash_site --site=www build
53+
- name: Check for broken Markdown link references
54+
run: dart run dash_site --site=www check-link-references
55+
- name: Check for broken internal links
56+
run: dart run dash_site --site=www check-links
57+
58+
firebase-validate:
59+
name: Validate Firebase configuration
60+
runs-on: ubuntu-latest
61+
if: github.repository == 'cfug/flutter.cn'
62+
timeout-minutes: 10
63+
steps:
64+
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0
65+
- uses: dart-lang/setup-dart@65eb853c7ba17dde3be364c3d2858773e7144260
66+
with:
67+
sdk: beta
68+
- name: Fetch Dart dependencies
69+
run: dart pub get
70+
- name: Validate the firebase.json file
71+
run: dart run dash_site --site=www verify-firebase-json
72+
73+
deploy:
74+
name: Deploy to production
75+
needs: [linkcheck, firebase-validate]
76+
runs-on: ubuntu-latest
77+
if: |
78+
github.event_name == 'push' &&
79+
github.ref == 'refs/heads/main' &&
80+
github.repository == 'cfug/flutter.cn'
81+
steps:
82+
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0
83+
with:
84+
fetch-depth: 0
85+
- uses: dart-lang/setup-dart@65eb853c7ba17dde3be364c3d2858773e7144260
86+
with:
87+
sdk: beta
88+
- name: Fetch Dart dependencies
89+
run: dart pub get
90+
- name: Build site
91+
run: dart run dash_site --site=www build --release
92+
- name: Deploy to production
93+
run: bash tool/deploy/deploy-cn-www.sh
94+
shell: bash
95+
env:
96+
DEPLOY_USER: ${{ secrets.DOCS_REPO_DEPLOY_USER }}
97+
DEPLOY_TOKEN: ${{ secrets.DOCS_REPO_DEPLOY_TOKEN }}

AGENTS.md

Lines changed: 29 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,20 @@ content and code in this repository.
77
## Project overview
88

99
This repository contains the source code and content for
10-
the Flutter framework's documentation website.
11-
It is hosted at `docs.flutter.dev` and shouldn't be confused with
12-
the marketing site at `flutter.dev` or the API docs at `api.flutter.dev`.
10+
the Flutter framework's documentation and marketing websites:
1311

14-
The website is statically built and implemented with
12+
- `docs.flutter.dev`:
13+
The Flutter framework's documentation website.
14+
- `flutter.dev`:
15+
Flutter's homepage and marketing website.
16+
17+
The API docs at `api.flutter.dev` are embedded in the Flutter SDK source
18+
and are maintained in the <https://github.com/flutter/flutter> repository.
19+
20+
The websites are statically built and implemented with
1521
Dart and the [Jaspr](https://jaspr.site) web framework.
16-
For loading content, data, and some of its assets,
17-
it uses [Jaspr Content](https://docs.jaspr.site/content).
22+
For loading content, data, and some assets,
23+
they use [Jaspr Content](https://docs.jaspr.site/content).
1824

1925
### Directory structure
2026

@@ -30,29 +36,40 @@ it uses [Jaspr Content](https://docs.jaspr.site/content).
3036
for the sidenav, glossary, and various indices.
3137
- `sites/docs/src/_includes/`:
3238
Liquid partial files written in Markdown.
39+
- `sites/www/`:
40+
The implementation of flutter.dev,
41+
written in Dart using Jaspr and Jaspr Content.
42+
- `sites/www/content/`:
43+
Markdown-based marketing pages and structured content.
44+
- `sites/www/lib/`:
45+
Dart source code for the site.
46+
- `sites/www/firebase.json`:
47+
Firebase Hosting configuration for flutter.dev.
3348
- `examples/`:
3449
A pub workspace containing Dart and Flutter code examples,
35-
referenced by code excerpts in the Markdown files.
50+
referenced by code excerpts in the docs Markdown files.
3651
- `tool/dash_site/`:
3752
CLI tool for site development and maintenance.
3853

3954
## Common commands
4055

41-
While working on the site,
56+
While working on these sites,
4257
you might need to run these commands:
4358

4459
```bash
4560
# Install or update Dart dependencies:
4661
dart pub get
4762

4863
# Serve a dev server of the site locally:
49-
dart run dash_site serve
64+
dart run dash_site --site=docs serve
65+
dart run dash_site --site=www serve
5066

5167
# Build a production version of the site:
52-
dart run dash_site build
68+
dart run dash_site --site=docs build
69+
dart run dash_site --site=www build
5370

54-
# Sync code excerpts to Markdown files:
55-
dart run dash_site refresh-excerpts
71+
# Sync docs code excerpts to Markdown files:
72+
dart run dash_site --site=docs refresh-excerpts
5673

5774
# Learn what other commands are available:
5875
dart run dash_site --help

README.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -148,9 +148,8 @@ following the instructions in [Get the prerequisites](#get-the-prerequisites).
148148
This command generates and serves the site on a
149149
local port that's printed to your terminal.
150150

151-
5. View your changes in the browser by navigating to <http://localhost:8080>.
152-
153-
Note the port might be different if `8080` is taken.
151+
5. View your changes in the browser by navigating to
152+
the local URL printed to your terminal.
154153

155154
6. Make your changes to the local repo.
156155

examples/cookbook/plugins/google_mobile_ads/pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ dependencies:
99
flutter:
1010
sdk: flutter
1111

12-
google_mobile_ads: ^8.0.0
12+
google_mobile_ads: ^9.0.0
1313

1414
flutter:
1515
uses-material-design: true

0 commit comments

Comments
 (0)