mirror of
https://github.com/jonasbark/swiftcontrol.git
synced 2026-02-18 00:17:40 +01:00
58 lines
1.2 KiB
YAML
58 lines
1.2 KiB
YAML
name: "Build Web"
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- web
|
|
- wahoo_kickr_bike_shift
|
|
- main
|
|
paths:
|
|
- '.github/workflows/web.yml'
|
|
- 'lib/**'
|
|
- 'accessibility/**'
|
|
- 'keypress_simulator/**'
|
|
- 'pubspec.yaml'
|
|
|
|
jobs:
|
|
build:
|
|
name: Build Web
|
|
runs-on: macos-latest
|
|
|
|
permissions:
|
|
id-token: write
|
|
pages: write
|
|
contents: write
|
|
|
|
steps:
|
|
#1 Checkout Repository
|
|
- name: Checkout Repository
|
|
uses: actions/checkout@v3
|
|
|
|
#3 Setup Flutter
|
|
- name: Set Up Flutter
|
|
uses: subosito/flutter-action@v2
|
|
with:
|
|
channel: 'stable'
|
|
|
|
- name: Generate translation files
|
|
|
|
run: |
|
|
flutter pub global activate intl_utils;
|
|
flutter pub global run intl_utils:generate;
|
|
|
|
#4 Install Dependencies
|
|
- name: Install Dependencies
|
|
run: flutter pub get
|
|
|
|
- name: Build Web
|
|
run: flutter build web --release --base-href "/swiftcontrol/"
|
|
|
|
- name: Upload static files as artifact
|
|
id: deployment
|
|
uses: actions/upload-pages-artifact@v3
|
|
with:
|
|
path: build/web
|
|
|
|
- name: Web Deploy
|
|
uses: actions/deploy-pages@v4
|