-
Notifications
You must be signed in to change notification settings - Fork 354
74 lines (68 loc) · 1.85 KB
/
build.yml
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
64
65
66
67
68
69
70
71
72
73
74
name: build
on:
push:
branches:
- main
pull_request:
branches:
- main
# Declare default permissions as read only.
permissions: read-all
env:
NODE_ENV: production
NODE_VERSION: 20
jobs:
test:
runs-on: ubuntu-latest
if: github.repository == 'cfug/flutter.cn'
strategy:
fail-fast: false
matrix:
include:
- name: "Beta channel"
branch: beta
experimental: true
- name: "Stable channel"
branch: stable
experimental: false
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
with:
submodules: recursive
- name: Move docs
run: make move-docs
- name: Test
env:
FLUTTER_BUILD_BRANCH: ${{ matrix.branch }}
run: make test
continue-on-error: ${{ matrix.experimental }}
deploy:
needs: test
runs-on: ubuntu-latest
if: |
github.event_name == 'push'
&& github.ref == 'refs/heads/main'
&& github.repository == 'cfug/flutter.cn'
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
with:
submodules: recursive
- name: Move docs
run: make move-docs
- name: Build site and check links
run: make build
# - name: Install Node for Firebase install
# uses: actions/setup-node@8f152de45cc393bb48ce5d89d36b731f54556e65
# with:
# node-version: ${{ env.NODE_VERSION }}
# - name: Install Firebase CLI
# run: npm install -g [email protected]
# - name: Deploy to Firebase hosting
# run: make deploy
# env:
# FIREBASE_TOKEN: ${{ secrets.FIREBASE_TOKEN }}
# FIREBASE_ALIAS: default
- name: Deploy CN
run: make deploy
env:
DEPLOY_TOKEN: ${{ secrets.CHENGLU_DEPLOY_KEY }}