Skip to content

GitHub pages deploy

GitHub pages deploy #1

Workflow file for this run

name: Deploy to GitHub Pages
on:
push:
branches:
- main
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- name: 📚 Git Checkout
uses: actions/checkout@v4
- name: 🐦 Setup Flutter
uses: subosito/flutter-action@v2
with:
channel: "stable"
flutter-version: 3.24.0
- name: 📦 Install Dependencies
run: flutter pub get
- name: 🛠️ Build the application
run: flutter build web -t lib/main.dart
- name: ⬇️ Archive Production Artifact
uses: actions/upload-artifact@v4
with:
name: web-build
path: build/web
deploy:
runs-on: ubuntu-latest
needs: build
steps:
- name: 📚 Git Checkout
uses: actions/checkout@v4
- name: 📦 Download Artifact
uses: actions/download-artifact@v4
with:
name: web-build
path: build/web
- name: 🚀 Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./build/web
publish_branch: gh-pages