Skip to content

Commit e450191

Browse files
Create main.yml
1 parent 0cc53be commit e450191

File tree

1 file changed

+35
-0
lines changed

1 file changed

+35
-0
lines changed

.github/workflows/main.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: Build
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
jobs:
8+
build:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v2
12+
with:
13+
submodules: recursive
14+
token: ${{ secrets.PAT }}
15+
- uses: subosito/[email protected]
16+
with:
17+
channel: stable
18+
- name: Clone deployment repo
19+
run: |
20+
git clone --single-branch "https://${{ secrets.PAT }}@github.com/searchy2/Demo.git" "clone_dir"
21+
rm -rf clone_dir/flutterwebsites/minimal
22+
mkdir -p clone_dir/flutterwebsites/minimal
23+
- name: Build
24+
run: |
25+
flutter build web --release
26+
mv build/web/* clone_dir/flutterwebsites/minimal
27+
- name: Push build commit
28+
run: |
29+
cd clone_dir
30+
git config user.name github-actions
31+
git config user.email [email protected]
32+
git add *
33+
git commit -m "Build Minimal ${{ steps.date.outputs.date }} (${{ steps.seconds.outputs.seconds }})"
34+
git pull --rebase
35+
git push

0 commit comments

Comments
 (0)