Update dart.yml #12
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 Web | |
on: | |
push: | |
branches: | |
- main | |
tags: | |
- '*' | |
pull_request: | |
paths-ignore: | |
- '**/*.md' | |
- '**/*.txt' | |
- '**/*.png' | |
- '**/*.jpg' | |
jobs: | |
build: | |
name: Build Web | |
env: | |
my_secret: ${{secrets.commit_secret}} | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: subosito/flutter-action@v1 | |
with: | |
flutter-version: '3.19.5' | |
- name: cd example | |
run: | | |
echo "This command runs in the 'example' directory." | |
working-directory: ./example | |
- run: flutter config --enable-web | |
- run: flutter pub get | |
- run: flutter build web --release | |
- run: | | |
cd build/web | |
git init | |
# type configurations: your user.email and user.name followed lines | |
# git config --global user.email your_email | |
# git config --global user.name your_name | |
git config --global user.email [email protected] | |
git config --global user.name boomcx | |
git status | |
# change this remote url for examle your remote url is https://github.com/boomcx/spinner_box.git then the following: | |
git remote add origin https://${{secrets.commit_secret}}@github.com/boomcx/spinner_box.git | |
git checkout -b gh-pages | |
git add --all | |
git commit -m "update" | |
git push origin gh-pages -f |