-
Notifications
You must be signed in to change notification settings - Fork 0
43 lines (35 loc) · 1.15 KB
/
web.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
name: Github-Pages
on:
push:
branches: [ "main" ]
workflow_dispatch:
jobs:
build-and-deploy:
runs-on: ubuntu-latest
environment: github-pages
steps:
- name: Clone repository
uses: actions/checkout@v4
- name: Set up Flutter
uses: subosito/flutter-action@v2
with:
channel: beta
cache: true
- name: Make envfile
run: echo "API_URL=${{ vars.API_URL }}" > .env
- name: Install dependencies
run: flutter pub get
- name: Run Tests
run: flutter test
# 404.html and flutter_bootstrap.js are mannually added to the web folder to
# fix the 404 error on GH Pages and fix PWA Padding issue
- name: Build web
run: flutter build web --wasm --base-href /batucadapp/ --no-web-resources-cdn
- name: Commit changes
run: |
git config --global user.name "github-actions"
git config --global user.email "[email protected]"
git --work-tree build/web add --all
git commit -m "Deploy to GitHub Pages"
git push origin HEAD:gh-pages --force
shell: bash