Skip to content

feat: add Distorted Motion shader and integrate into shader list #19

feat: add Distorted Motion shader and integrate into shader list

feat: add Distorted Motion shader and integrate into shader list #19

Workflow file for this run

name: Deploy Flutter Web to GitHub Pages
on:
push:
branches: [ main ]
workflow_dispatch:
# This workflow builds a Flutter web app with SPA routing support for GitHub Pages
# It uses a custom 404.html file and redirect scripts to handle client-side routing
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
concurrency:
group: "pages"
cancel-in-progress: false
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup Flutter
uses: subosito/flutter-action@v2
with:
flutter-version: '3.32.8'
channel: 'stable'
- name: Get dependencies
run: flutter pub get
- name: Copy shaders to assets
run: dart scripts/copy_shaders.dart
- name: Generate SEO files
run: |
dart scripts/generate_sitemap.dart
- name: Build for GitHub Pages (with SPA routing)
run: dart scripts/build_github_pages.dart --release
- name: Verify SPA routing files
run: |
echo "πŸ“‹ Verifying GitHub Pages SPA setup..."
if [ -f "build/web/404.html" ]; then
echo "βœ… 404.html found"
else
echo "❌ 404.html missing"
exit 1
fi
if [ -f "build/web/.nojekyll" ]; then
echo "βœ… .nojekyll found"
else
echo "❌ .nojekyll missing"
exit 1
fi
if grep -q "/shaders_gallery/" build/web/index.html; then
echo "βœ… Base href correctly set"
else
echo "❌ Base href not found in index.html"
exit 1
fi
if [ -f "build/web/sitemap.xml" ]; then
echo "βœ… sitemap.xml found"
else
echo "❌ sitemap.xml missing"
exit 1
fi
if [ -f "build/web/robots.txt" ]; then
echo "βœ… robots.txt found"
else
echo "❌ robots.txt missing"
exit 1
fi
echo "πŸŽ‰ All SPA routing and SEO files verified!"
- name: Setup Pages
uses: actions/configure-pages@v5
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: ./build/web
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: build
if: github.ref == 'refs/heads/main'
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4