generated from uw-ssec/project-template
-
Notifications
You must be signed in to change notification settings - Fork 2
57 lines (49 loc) · 1.55 KB
/
web-main.yaml
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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
name: web
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write
on:
push:
branches:
- main
workflow_dispatch:
jobs:
call-run-server:
uses: uw-ssec/post-disaster-comms/.github/workflows/run-dev-server.yml@main
build-and-publish:
runs-on: ubuntu-latest
# This workflow accesses secrets and checks out a PR, so only run if labelled
# https://securitylab.github.com/research/github-actions-preventing-pwn-requests/
# if: contains(github.event.pull_request.labels.*.name, 'preview')
defaults:
run:
working-directory: ./src/support_sphere
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}
- name: Set up Flutter
uses: subosito/flutter-action@v2
with:
channel: stable
- run: flutter pub get
# original values are in deployment/values.cloud.yaml
- run: |
flutter build web \
--release \
--base-href "/post-disaster-comms/" \
--web-renderer html \
--dart-define=SUPABASE_ANON_KEY=${{ secrets.CLOUD_DB_JWT_ANON_KEY}} \
--dart-define=SUPABASE_URL=${{ secrets.CLOUD_DB_URL}}
- name: Upload Pages HTML
uses: actions/upload-pages-artifact@v3
with:
path: src/support_sphere/build/web
- name: Setup GitHub Pages
uses: actions/configure-pages@v5
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4