Merge pull request #68 from an920107/frontend #107
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: frontend-ci | |
on: | |
push: | |
branches: | |
- main | |
- frontend | |
workflow_call: | |
inputs: | |
environment: | |
type: string | |
required: true | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Set up Flutter | |
uses: subosito/flutter-action@v2 | |
with: | |
channel: stable | |
flutter-version: 3.22.1 | |
- name: Resolve Flutter dependency | |
run: cd frontend && flutter pub get | |
- name: Create .env file | |
run: cd frontend && echo "NCU_PORTAL_CLIENT_ID=${{ secrets.NCU_PORTAL_CLIENT_ID }}" > .env | |
- name: Analyze and build web | |
run: | | |
cd frontend | |
flutter analyze | |
flutter build web --web-renderer=canvaskit | |
- name: Upload artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: frontend-artifact | |
path: frontend/build/web/ |