Merge pull request #345 from dwyl/fix_ci#344 #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 Web (GitHub Pages) | |
on: | |
push: | |
branches: [ main ] | |
permissions: | |
contents: write | |
jobs: | |
build-and-deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Install Flutter | |
uses: subosito/flutter-action@v2 | |
with: | |
channel: 'stable' | |
- name: Install dependencies | |
run: flutter pub get | |
# See stackoverflow.com/questions/74164386/flutter-web-shows-blank-page-on-github-deployment | |
- name: Install and Build | |
run: flutter build web --release --web-renderer html | |
- name: Deploy to Github Pages | |
uses: JamesIves/github-pages-deploy-action@v4 | |
with: | |
branch: gh-pages # The branch the action should deploy to. | |
folder: ./build/web # The folder the action should deploy. | |