File tree Expand file tree Collapse file tree 1 file changed +64
-0
lines changed Expand file tree Collapse file tree 1 file changed +64
-0
lines changed Original file line number Diff line number Diff line change
1
+ name: full ci
2
+
3
+ on:
4
+ push:
5
+ branches:
6
+ master
7
+
8
+ jobs:
9
+ build-and-deploy-api:
10
+ runs-on: ubuntu-latest
11
+ steps:
12
+ # checkout the repo
13
+ - uses: actions/checkout@master
14
+
15
+ # az login
16
+ - uses: azure/login@v1
17
+ with:
18
+ creds: ${{ secrets.CREDENTIALS }}
19
+
20
+ - name: Setup Python 3.6
21
+ uses: actions/setup-python@v1
22
+ with:
23
+ python-version: 3.6
24
+
25
+ - name: 'Run pip'
26
+ shell: bash
27
+ run: |
28
+ pushd api
29
+ python -m pip install --upgrade pip
30
+ pip install -r requirements.txt --target=".python_packages/lib/python3.6/site-packages"
31
+ popd
32
+
33
+ - name: 'Run Azure Functions Action'
34
+ uses: Azure/functions-action@v1
35
+ id: fa
36
+ with:
37
+ app-name: ${{ secrets.FUNC_APP }}
38
+ package: 'api'
39
+
40
+ build-and-deploy-client:
41
+ runs-on: ubuntu-latest
42
+ env:
43
+ WEB_PATH: $web
44
+ ACCOUNT: ${{ secrets.STORAGE_ACCOUNT }}
45
+ KEY: ${{ secrets.STORAGE_KEY }}
46
+ steps:
47
+ # checkout the repo
48
+ - uses: actions/checkout@master
49
+
50
+ # install dependencies, build, and test
51
+ - name: npm install, build
52
+ run: |
53
+ pushd client
54
+ npm install
55
+ npm run build --if-present
56
+ popd
57
+ # clear old site
58
+ - name: clear old site
59
+ run : |
60
+ az storage blob delete-batch --source $WEB_PATH --account-name $ACCOUNT --account-key $KEY
61
+ # push to azure storage
62
+ - name: push to azure storage
63
+ run : |
64
+ az storage blob upload-batch -s client/dist -d $WEB_PATH --account-name $ACCOUNT --account-key $KEY
You can’t perform that action at this time.
0 commit comments