Create jekyll-gh-pages.yml #1
This file contains 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 with GitHub Pages | |
on: | |
push: | |
branches: | |
- master | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Set up Flutter | |
uses: subosito/flutter-action@v2 | |
with: | |
flutter-version: '2.x' # You can adjust the Flutter version if needed | |
- name: Install dependencies | |
run: flutter pub get | |
- name: Build Flutter web | |
run: flutter build web | |
- name: Archive web build | |
uses: actions/upload-artifact@v2 | |
with: | |
name: web-build | |
path: build/web | |
deploy: | |
runs-on: ubuntu-latest | |
needs: build | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Download web build artifact | |
uses: actions/download-artifact@v2 | |
with: | |
name: web-build | |
path: build/web | |
- name: Deploy to GitHub Pages | |
uses: peaceiris/actions-gh-pages@v3 | |
with: | |
github_token: ${{ secrets.MY_TOKEN }} | |
publish_dir: ./build/web |