Skip to content

Instantly share code, notes, and snippets.

@gausoft
Created May 27, 2023 10:28
Show Gist options
  • Save gausoft/a211367abd7b7bf1ac151624c7beed6a to your computer and use it in GitHub Desktop.
Save gausoft/a211367abd7b7bf1ac151624c7beed6a to your computer and use it in GitHub Desktop.
Deploy Flutter web app to Github Pages
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
@gausoft
Copy link
Author

gausoft commented May 27, 2023

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment