Skip to content

Commit 59dd42e

Browse files
authored
Create gh-pages.yml
1 parent 4b04b60 commit 59dd42e

File tree

1 file changed

+38
-0
lines changed

1 file changed

+38
-0
lines changed

.github/workflows/gh-pages.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
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
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

0 commit comments

Comments
 (0)