Merge pull request #115 from mkobuolys/feat/poc-widget-as-a-slide #28
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: Build the example and docs website | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
build_demo: | |
name: Build flutter_deck demo presentation | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
working-directory: ./packages/flutter_deck/example | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup Flutter | |
uses: subosito/flutter-action@v2 | |
with: | |
channel: stable | |
- name: Install dependencies | |
run: flutter pub get | |
- name: Replace index.html | |
run: mv web/gh_pages.index.html web/index.html | |
- name: Build web | |
run: flutter build web --release --web-renderer=canvaskit | |
- name: Upload artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: demo-presentation | |
path: ./packages/flutter_deck/example/build/web | |
if-no-files-found: error | |
build_docs: | |
name: Build flutter_deck docs website | |
needs: build_demo | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
working-directory: ./doc/website | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup Dart | |
uses: dart-lang/setup-dart@v1 | |
- name: Install dependencies | |
run: dart pub get | |
- name: Build docs website | |
run: dart run bin/main.dart | |
- name: Download flutter_deck demo presentation | |
uses: actions/download-artifact@v4 | |
with: | |
name: demo-presentation | |
path: ./doc/website/build/demo | |
- name: Upload artifact | |
uses: actions/upload-pages-artifact@v3 | |
with: | |
path: ./doc/website/build | |
deploy: | |
name: Deploy to GitHub Pages | |
needs: build_docs | |
runs-on: ubuntu-latest | |
permissions: | |
pages: write | |
id-token: write | |
environment: | |
name: github-pages | |
url: ${{ steps.deployment.outputs.page_url }} | |
steps: | |
- name: Deploy to GitHub Pages | |
id: deployment | |
uses: actions/deploy-pages@v4 |