Skip to content

Fix workflow (#6)

Fix workflow (#6) #9

name: Build and deploy on GitHub Pages
on:
workflow_dispatch:
push:
branches: [main]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: subosito/flutter-action@v2
with:
channel: 'stable'
- run: flutter pub get
- run: flutter test
- run: flutter build web
- name: Copy index.html to 404.html
run: cp build/web/index.html build/web/404.html
- uses: crazy-max/ghaction-github-pages@v3
with:
target_branch: gh-pages
build_dir: build/web
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}