Skip to content

Merge pull request #42 from Resellio/develop #8

Merge pull request #42 from Resellio/develop

Merge pull request #42 from Resellio/develop #8

Workflow file for this run

name: Deploy Flutter Web to GitHub Pages
on:
push:
branches:
- main
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
# Checkout the repository code
- name: Checkout Repository
uses: actions/checkout@v3
# Set up Flutter environment
- name: Setup Flutter
uses: subosito/flutter-action@v2
with:
flutter-version: '3.29.x'
channel: 'stable'
# Install dependencies
- name: Install Dependencies
run: flutter pub get
# Run build_runner
- name: Run build_runner
run: dart run build_runner build --delete-conflicting-outputs
# Build the web app
- name: Build Flutter Web
run: flutter build web --release --base-href "/client/"
# Deploy to GitHub Pages
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }} # Automatically provided by GitHub
publish_dir: build/web # Directory containing the built web app
publish_branch: gh-pages # Target branch for GitHub Pages