Skip to content

Create static.yml

Create static.yml #3

Workflow file for this run

name: Deploy Flutter Web App
on:
push:
branches:
- main
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: subosito/flutter-action@v2
with:
channel: stable # or 'dev', 'beta', or a specific version
- run: flutter config --enable-web
- run: flutter build web --base-href /<リポジトリ名>/ # 重要: リポジトリ名に置き換える
- name: Create docs directory
run: mkdir -p docs
- name: Copy build files to docs
run: cp -r build/web/* docs/
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./docs