Hugoとやらを使わないように修正 #2
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 |