-
Notifications
You must be signed in to change notification settings - Fork 2
/
codemagic.yaml
37 lines (35 loc) · 1.16 KB
/
codemagic.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
workflows:
production:
name: Deploy to production
environment:
groups:
- aws-production
- production
instance_type: linux_x2
triggering:
events:
- push
branch_patterns:
- pattern: 'main'
include: true
source: true
scripts:
- name: Fetch Google Codelab tool
script: |
set -e
# for now just hardcode for Linux on x86_64 for now
wget https://github.com/googlecodelabs/tools/releases/download/v2.2.6/claat-linux-amd64
chmod +x claat-linux-amd64
- name: Build HTML static site
script: |
set -e
mkdir build
cd build
../claat-linux-amd64 export -f ../cm_template.html ../src/your-first-flutter-app-to-appstore/index.md
# copy across static assets, eg. top level index.html, site icon etc
cp ../static/* .
- name: Deploy to production
script: |
set -e
aws s3 sync build s3://labs.codemagic.io/ --delete --cache-control max-age=31536000,public
aws cloudfront create-invalidation --distribution-id $DISTRIBUTION_ID --paths '/*'