Skip to content

Instantly share code, notes, and snippets.

@onatcipli
Last active June 20, 2021 06:06
Show Gist options
  • Save onatcipli/6fdfa8a3863c1131706e70eb54a3f3fa to your computer and use it in GitHub Desktop.
Save onatcipli/6fdfa8a3863c1131706e70eb54a3f3fa to your computer and use it in GitHub Desktop.
building and publishing flutter web application
name: Flutter Web
on:
push:
branches:
- master
jobs:
build:
name: Build Web
env:
my_secret: ${{secrets.commit_secret}}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: subosito/flutter-action@v1
with:
channel: 'dev'
- 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 onatcipli@outlook.com
git config --global user.name onatcipli
git status
# change this remote url for examle your remote url is https://github.com/onatcipli/flutter_web.git then the following:
git remote add origin https://${{secrets.commit_secret}}@github.com/onatcipli/flutter_web.git
git checkout -b gh-pages
git add --all
git commit -m "update"
git push origin gh-pages -f
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment