Created
May 27, 2023 10:28
-
-
Save gausoft/a211367abd7b7bf1ac151624c7beed6a to your computer and use it in GitHub Desktop.
Deploy Flutter web app to Github Pages
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 to GitHub Pages | |
on: | |
workflow_dispatch: | |
push: | |
branches: [main, develop] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Setup Flutter | |
uses: subosito/flutter-action@v2 | |
with: | |
flutter-version: '3.10.0' | |
channel: 'stable' | |
- name: Install dependencies | |
run: flutter packages get | |
- name: Build web | |
run: flutter build web --release --base-href '/repo_name/' | |
- name: Deploy | |
uses: peaceiris/actions-gh-pages@v3 | |
with: | |
github_token: ${{ secrets.commit_secret }} | |
publish_dir: ./build/web |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Checkout this article : https://niemtec.com/deploying-a-flutter-web-app-to-github-pages/