New MaxWidthBox Implementation #2 #11
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |