Update main.yml #13
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: deploy web | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
build: | |
name: Build Web | |
env: | |
my_secret: ${{secrets.INSIGHT_TOKEN}} | |
defaults: | |
run: | |
working-directory: example | |
runs-on: ubuntu-latest | |
steps: | |
- name: 📚 Git Checkout | |
uses: actions/checkout@v3 | |
- name: 🐦 Setup Flutter | |
uses: subosito/flutter-action@v2 | |
with: | |
cache: true | |
- name: 📦 Install Dependencies | |
run: | | |
flutter pub global activate very_good_cli | |
- name: 🛠 Build web | |
run: flutter build web --dart-define=FLUTTER_WEB_USE_SKIA=true | |
- name: 🚀 Deploy to github pages | |
run: | | |
cd build/web | |
git init | |
git status | |
git remote add origin https://${{secrets.INSIGHT_TOKEN}}@github.com/kspo/super_cupertino_navigation_bar.git | |
git checkout -b gh-pages | |
git add --all | |
git commit -m "Update web" | |
git push origin gh-pages -f |