id #100
This file contains hidden or 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 Web | |
on: | |
workflow_call: | |
push: | |
branches: | |
- main | |
paths: | |
- '.github/workflows/build-web.yml' | |
- 'web/**' | |
- 'lib/**' | |
- '*.yaml' | |
permissions: | |
contents: write | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Setup Flutter | |
uses: subosito/flutter-action@v2 | |
with: | |
flutter-version: '3.29.0' | |
- name: Build Web App | |
run: | | |
flutter pub get | |
flutter build web -v --base-href /maid/ | |
- name: Upload Web Build | |
uses: actions/upload-artifact@v4 | |
with: | |
name: maid-web | |
path: build/web | |
- name: Deploy to GitHub Pages | |
uses: JamesIves/github-pages-deploy-action@v4 | |
with: | |
branch: gh-pages # The branch where you want to deploy (usually gh-pages) | |
folder: build/web # Path to the web build folder | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |