-
Notifications
You must be signed in to change notification settings - Fork 175
43 lines (41 loc) · 1.37 KB
/
build_canvas.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
name: Build Canvas
on:
push:
branches:
- master
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
token: ${{ secrets.PAT }}
- uses: subosito/flutter-action@v2
with:
channel: stable
- name: Clone deployment repo
run: |
git clone --single-branch "https://${{ secrets.PAT }}@github.com/searchy2/Demo.git" "clone_dir"
rm -rf clone_dir/flutterwebsites/minimal-canvas/
mkdir -p clone_dir/flutterwebsites/minimal-canvas/
- name: Build
run: |
flutter build web --release --base-href /flutterwebsites/minimal-canvas/ --web-renderer canvaskit
mv build/web/* clone_dir/flutterwebsites/minimal-canvas
- name: Get current date
id: date
run: echo "date=$(date +'%Y%m%d')" >> $GITHUB_OUTPUT
- name: Get time in seconds
id: seconds
run: echo "seconds=$(date +'%s')" >> $GITHUB_OUTPUT
- name: Push build commit
run: |
cd clone_dir
git config user.name github-actions
git config user.email [email protected]
git add *
git commit -m "Build Minimal Canvas ${{ steps.date.outputs.date }} (${{ steps.seconds.outputs.seconds }})"
git pull --rebase
git push