forked from cfug/flutter.cn
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
121 changed files
with
3,110 additions
and
2,607 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,8 +2,6 @@ | |
.gitignore | ||
AUTHORS | ||
CONTRIBUTING.md | ||
docker-compose.yml | ||
LICENSE | ||
node_modules/ | ||
README.md | ||
flutter/ |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,7 +17,7 @@ env: | |
|
||
jobs: | ||
test: | ||
name: Check excerpts and run tests | ||
name: Analyze and test code examples | ||
runs-on: ubuntu-latest | ||
if: github.repository == 'cfug/flutter.cn' | ||
strategy: | ||
|
@@ -36,10 +36,36 @@ jobs: | |
submodules: recursive | ||
- name: Move docs | ||
run: make move-docs | ||
- name: Test | ||
env: | ||
FLUTTER_BUILD_BRANCH: ${{ matrix.branch }} | ||
run: make test | ||
- uses: subosito/flutter-action@2783a3f08e1baf891508463f8c6653c258246225 | ||
with: | ||
channel: ${{ matrix.branch }} | ||
- name: Fetch Dart dependencies | ||
run: dart pub get | ||
- name: Check Dart code formatting | ||
run: dart run flutter_site format-dart --check | ||
continue-on-error: ${{ matrix.experimental }} | ||
- name: Analyze Dart code | ||
run: dart run flutter_site analyze-dart | ||
continue-on-error: ${{ matrix.experimental }} | ||
- name: Run Dart tests | ||
run: dart run flutter_site test-dart | ||
continue-on-error: ${{ matrix.experimental }} | ||
|
||
excerpts: | ||
name: Check if code excerpts are up to date | ||
runs-on: ubuntu-latest | ||
if: github.repository == 'cfug/flutter.cn' | ||
steps: | ||
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 | ||
with: | ||
submodules: recursive | ||
- uses: dart-lang/setup-dart@fedb1266e91cf51be2fdb382869461a434b920a3 | ||
with: | ||
sdk: stable | ||
- name: Fetch Dart dependencies | ||
run: dart pub get | ||
- name: Check if excerpts are up to date | ||
run: dart run flutter_site refresh-excerpts --fail-on-update | ||
continue-on-error: ${{ matrix.experimental }} | ||
|
||
linkcheck: | ||
|
@@ -53,20 +79,41 @@ jobs: | |
submodules: recursive | ||
- name: Build site and check links | ||
run: make build BUILD_CONFIGS=_config.yml,_config_stage.yml | ||
# - name: Install Node for Firebase install | ||
# uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 | ||
# with: | ||
# node-version: ${{ env.NODE_VERSION }} | ||
# - name: Install Firebase CLI | ||
# run: npm install -g [email protected] | ||
- name: Install Node for Firebase install | ||
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 | ||
with: | ||
node-version: ${{ env.NODE_VERSION }} | ||
- name: Install Firebase CLI | ||
run: npm install -g [email protected] | ||
- uses: dart-lang/setup-dart@fedb1266e91cf51be2fdb382869461a434b920a3 | ||
with: | ||
sdk: stable | ||
- name: Fetch Dart dependencies | ||
run: dart pub get | ||
- name: Check for broken Markdown link references | ||
run: dart run flutter_site check-link-references | ||
- name: Check for broken internal links | ||
run: dart run flutter_site check-links | ||
|
||
firebase-validate: | ||
name: Validate Firebase configuration | ||
runs-on: ubuntu-latest | ||
if: github.repository == 'cfug/flutter.cn' | ||
steps: | ||
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 | ||
with: | ||
submodules: recursive | ||
- uses: dart-lang/setup-dart@fedb1266e91cf51be2fdb382869461a434b920a3 | ||
with: | ||
sdk: stable | ||
- run: tool/check-links.sh | ||
- name: Fetch Dart dependencies | ||
run: dart pub get | ||
- name: Validate the firebase.json file | ||
run: dart run flutter_site verify-firebase-json | ||
|
||
deploy: | ||
name: Deploy to production | ||
needs: [test, linkcheck] | ||
needs: [test, excerpts, linkcheck, firebase-validate] | ||
runs-on: ubuntu-latest | ||
if: | | ||
github.event_name == 'push' | ||
|
@@ -78,18 +125,6 @@ jobs: | |
submodules: recursive | ||
- name: Build site | ||
run: make build | ||
# - name: Install Node for Firebase install | ||
# uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 | ||
# with: | ||
# node-version: ${{ env.NODE_VERSION }} | ||
# - name: Install Firebase CLI | ||
# run: npm install -g [email protected] | ||
# - uses: dart-lang/setup-dart@fedb1266e91cf51be2fdb382869461a434b920a3 | ||
# with: | ||
# sdk: stable | ||
# - run: tool/check-links.sh | ||
# - name: Deploy to Firebase hosting | ||
# run: make deploy # TODO(drewroengoogle) Run deploy on Cloud Build. | ||
- name: Deploy CN | ||
run: make deploy | ||
env: | ||
|
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,7 +10,7 @@ _site | |
*.swp | ||
build | ||
node_modules | ||
flutter/ | ||
./flutter/ | ||
|
||
# Dart and Flutter, build related | ||
.dart_tool | ||
|
This file contains 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
This file contains 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
Oops, something went wrong.