[完成翻译] Learn 路径、Architecture 系列及设计模式 (27篇) #396
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Stage site on Firebase | |
| on: | |
| pull_request: | |
| branches: | |
| - main | |
| # 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@de0fac2e4500dabe0009e67214ff5f5447ce83dd | |
| with: | |
| # docs.flutter.cn | https://github.com/cfug/flutter.cn/pull/1518 | |
| fetch-depth: 0 | |
| - uses: dart-lang/setup-dart@e51d8e571e22473a2ddebf0ef8a2123f0ab2c02c | |
| with: | |
| sdk: beta | |
| - name: Fetch Dart dependencies | |
| run: dart pub get | |
| - name: Build site | |
| run: dart run dash_site build --release | |
| - uses: actions/setup-node@v6 | |
| with: | |
| node-version: 22 | |
| - 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: "/" | |