Skip to content

Merge pull request #24 from LEO0331/lc/dev/newfeatures #21

Merge pull request #24 from LEO0331/lc/dev/newfeatures

Merge pull request #24 from LEO0331/lc/dev/newfeatures #21

Workflow file for this run

name: Deploy Flutter Web to GitHub Pages
on:
push:
branches:
- main
workflow_dispatch:
permissions:
contents: read
pages: write
id-token: write
concurrency:
group: pages
cancel-in-progress: true
jobs:
build:
runs-on: ubuntu-latest
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: Build web
env:
BOXMATCH_API_BASE_URL: ${{ secrets.BOXMATCH_API_BASE_URL }}
run: |
if [ -n "$BOXMATCH_API_BASE_URL" ]; then
flutter build web --release --base-href /boxmatch/ \
--dart-define=BOXMATCH_API_BASE_URL="$BOXMATCH_API_BASE_URL"
else
flutter build web --release --base-href /boxmatch/
fi
- name: Setup Pages
uses: actions/configure-pages@v5
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: build/web
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: build
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4