-
Notifications
You must be signed in to change notification settings - Fork 23
64 lines (55 loc) · 1.36 KB
/
Main.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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
name: Main
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
build-and-deploy:
strategy:
matrix:
platform: [aws]
runs-on: ${{matrix.platform}}
steps:
- name: checkout
uses: actions/checkout@v2
- name: Prepare key
shell: bash
run: |
tar -C ~/.ssh -zcf key.tar.gz ./
- name: Generate env file
env:
REACT_APP_MAILCHIMP_U: ${{ secrets.MAILCHIMP_U }}
REACT_APP_MAILCHIMP_ID: ${{ secrets.MAILCHIMP_ID }}
shell: bash
run: |
cat <<EOF > .env
touch .env
REACT_APP_MAILCHIMP_U="$REACT_APP_MAILCHIMP_U"
REACT_APP_MAILCHIMP_ID="$REACT_APP_MAILCHIMP_ID"
REACT_APP_MAILCHIMP_URL="https://findora.us3.list-manage.com/subscribe/post"
EOF
echo "cat .env"
cat .env
- name: Build fn
shell: bash
run: |
make build_musl_fn
- name: Build wiki doc
shell: bash
run: |
make ci_build_wiki
- name: update S3
shell: bash
run: |
aws s3 cp build s3://wiki.findora.org/ --recursive
- name: cloudfront invalidation
shell: bash
run: |
aws cloudfront create-invalidation --distribution-id E1H48R59LK4RSZ --paths "/*"
- name: Cleanup
shell: bash
run: |
make cleanup_image