-
Notifications
You must be signed in to change notification settings - Fork 0
57 lines (46 loc) · 1.41 KB
/
deploy.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: Deploy to DigitalOcean
on:
push:
branches:
- main
jobs:
deploy:
runs-on: ubuntu-latest
environment: Deploy
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Get .env from S3
env:
AWS_ACCESS_KEY: ${{ secrets.DO_S3_ACCESS_KEY }}
AWS_SECRET_KEY: ${{ secrets.DO_S3_SECRET_KEY }}
AWS_REGION: eu-west-1
AWS_ENDPOINT_URL_S3: https://fra1.digitaloceanspaces.com/
S3_BUCKET: ${{ secrets.DATE_CONFIG_BUCKET }}
S3_KEY: ${{ secrets.DATE_FUNCTIONS_ENV }}
run: |
aws s3api get-object --bucket $S3_BUCKET --key $S3_KEY .env --debug
- name: Set up DigitalOcean CLI
uses: digitalocean/action-doctl@v2
with:
token: ${{ secrets.DIGITALOCEAN_ACCESS_TOKEN }}
- name: Setup serverless
run: |
doctl serverless install
- name: Install python dev requirements
run: |
pip install -r requirements.txt
- name: Deploy qa
run: |
doctl serverless connect date-qa
doctl serverless deploy .
- name: Smoketest qa
run: |
./script/smoketest.sh date-qa
- name: deploy prod
run: |
doctl serverless connect date-prod
doctl serverless deploy .
- name: Smoketest prod
run: |
./script/smoketest.sh date-prod