-
Notifications
You must be signed in to change notification settings - Fork 0
32 lines (29 loc) · 1.01 KB
/
deploy_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
# lifted from https://github.com/dwyl/app/blob/main/.github/workflows/deploy_web.yml
name: Deploy Web (GitHub Pages)
on:
push:
branches: [ main ]
permissions:
contents: write
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Write .env
run: echo "${{ secrets.DOT_ENV }}" > .env
- name: Install Flutter
uses: subosito/flutter-action@v2
with:
channel: 'stable'
- name: Install dependencies
run: flutter pub get
# See stackoverflow.com/questions/74164386/flutter-web-shows-blank-page-on-github-deployment
- name: Install and Build
run: flutter build web --release --web-renderer html --base-href /didyoucodetoday/
- name: Deploy to Github Pages
uses: JamesIves/github-pages-deploy-action@v4
with:
branch: gh-pages # The branch the action should deploy to.
folder: ./build/web # The folder the action should deploy.