-
Notifications
You must be signed in to change notification settings - Fork 365
63 lines (59 loc) · 1.87 KB
/
Copy pathdocs-stage.yml
File metadata and controls
63 lines (59 loc) · 1.87 KB
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
name: Stage site on Firebase
on:
pull_request:
branches:
- main
paths:
- 'sites/docs/**'
- 'examples/**'
- 'packages/excerpter/**'
- 'firebase.json'
- 'tool/dash_site/**'
- 'tool/config/linkcheck-skip-list.txt'
- 'pubspec.yaml'
- 'pubspec.lock'
- 'analysis_options.yaml'
- '.github/workflows/docs.yml'
# Declare default permissions as read only.
permissions: read-all
jobs:
stage:
permissions:
contents: read
checks: write
pull-requests: write
runs-on: ubuntu-latest
if: |
github.event.pull_request.head.repo.full_name == 'cfug/flutter.cn'
steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0
with:
# docs.flutter.cn | https://github.com/cfug/flutter.cn/pull/1518
fetch-depth: 0
- uses: dart-lang/setup-dart@65eb853c7ba17dde3be364c3d2858773e7144260
with:
sdk: beta
- name: Fetch Dart dependencies
run: dart pub get
- name: Build site
run: dart run dash_site --site=docs build --release
- uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e
with:
node-version: 24
- name: Translated (docs.flutter.cn)
run: bash tool/translator/build.sh
shell: bash
- name: Stage
if: |
github.repository == 'cfug/flutter.cn' &&
github.event.pull_request.user.login != 'dependabot[bot]'
uses: cfug/doc-site-preview-in-pr@main
with:
repoToken: '${{ secrets.GITHUB_TOKEN }}'
firebaseServiceAccount: '${{ secrets.FIREBASE_SERVICE_ACCOUNT_FLUTTER_CN_DOCS_PROD }}'
expires: 14d
projectId: flutter-cn-docs-prod
showDetailedUrls: true
fileExtensionFilter: "md, html"
originalPath: "src/content/"
replacedPath: "/"