Revert "Merge pull request #2 from abdelaziz-mahdy/optimize-rendering" #56
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: Flutter Build and Deploy to GitHub Pages | |
on: | |
push: | |
branches: | |
- main | |
concurrency: | |
group: auto-deploy | |
cancel-in-progress: true | |
jobs: | |
build_web: | |
name: Build Flutter Web, Take Screenshots and Deploy | |
runs-on: ubuntu-latest | |
steps: | |
- name: Get the branch name | |
run: echo "Current branch name is ${{ github.ref_name }}" | |
- name: Checkout Code | |
uses: actions/checkout@v2 | |
- name: Setup Flutter | |
uses: subosito/flutter-action@v2 | |
with: | |
channel: "stable" | |
# channel: "master" | |
cache: true | |
- name: Install Flutter Dependencies | |
run: flutter pub get | |
- name: 🎯 Take screenshots | |
run: | | |
flutter test --update-goldens | |
- name: Build Flutter Web | |
run: flutter build web --release --base-href "/bouncy_ball_physics/" --web-renderer canvaskit | |
# - name: Build Flutter Web wasm | |
# run: flutter build web --wasm --release --base-href "/bouncy_ball_physics/" --web-renderer canvaskit | |
- name: Deploy to GitHub Pages | |
uses: peaceiris/actions-gh-pages@v3 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: ./build/web | |
# publish_dir: ./build/web_wasm | |
- name: Fetch and Merge Changes from Main | |
run: | | |
git fetch | |
git pull | |
- name: Auto Commit | |
uses: stefanzweifel/git-auto-commit-action@v4 | |
with: | |
commit_message: "Chore: update screenshot" | |
# file_pattern: "**/*.png" | |
repository: . | |
skip_fetch: false |