Skip to content

Use Record instead of Tuple #12

Use Record instead of Tuple

Use Record instead of Tuple #12

name: Deploy example to GitHub pages
on:
push:
branches: [ main ]
# Allow running this workflow manually from the Actions tab.
workflow_dispatch:
env:
FLUTTER_SDK_VERSION: '3.3.9'
FLUTTER_BASE_HREF: '/freestyle_speed_dial/'
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write
# Allow only one concurrent deployment workflow
concurrency:
group: "deploy_web"
cancel-in-progress: true
jobs:
build_web:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup GitHub Pages
uses: actions/configure-pages@v2
- name: Setup Flutter
uses: subosito/flutter-action@v2
with:
flutter-version: ${{ env.FLUTTER_SDK_VERSION }}
channel: 'stable'
- name: Download pub dependencies
working-directory: example
run: flutter pub get
- name: Build web
working-directory: example
run: flutter build web --base-href "${{ env.FLUTTER_BASE_HREF }}"
- name: Upload web artifact
uses: actions/upload-pages-artifact@v1
with:
path: 'example/build/web'
deploy_web:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: build_web
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v1