File tree Expand file tree Collapse file tree 1 file changed +46
-0
lines changed Expand file tree Collapse file tree 1 file changed +46
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Github Pages
2+
3+ on :
4+ push :
5+ branches :
6+ - main
7+ - master
8+ pull_request :
9+
10+ jobs :
11+ deploy :
12+ runs-on : ubuntu-latest
13+ permissions :
14+ contents : write
15+ concurrency :
16+ group : ${{ github.workflow }}-${{ github.ref }}
17+ steps :
18+ - uses : actions/checkout@v4
19+
20+ - name : Setup Flutter
21+ run : |
22+ git clone https://github.com/flutter/flutter.git --depth 1 -b stable _flutter
23+ echo "${GITHUB_WORKSPACE}/_flutter/bin" >> ${GITHUB_PATH}
24+
25+ - name : Install
26+ run : |
27+ flutter config --enable-web
28+ flutter pub get
29+
30+ - name : Build
31+ run : flutter build web --base-href "/${{ github.event.repository.name }}/"
32+
33+ - name : Deploy
34+ uses : peaceiris/actions-gh-pages@v4
35+ if : github.ref == 'refs/heads/main'
36+ with :
37+ github_token : ${{ secrets.GITHUB_TOKEN }}
38+ publish_dir : ./build/web
39+
40+ - name : Deploy (Test)
41+ uses : peaceiris/actions-gh-pages@v4
42+ if : github.ref != 'refs/heads/main'
43+ with :
44+ github_token : ${{ secrets.GITHUB_TOKEN }}
45+ publish_dir : ./build/web
46+ publish_branch : gh-pages-test
You can’t perform that action at this time.
0 commit comments