-
Notifications
You must be signed in to change notification settings - Fork 0
52 lines (50 loc) · 1.55 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
on:
push:
branches:
- master
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: 16
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: 3.8
- name: Install Plugin and Deploy
uses: dhollerbach/actions.serverless-with-python-requirements@v2
with:
args: -c "serverless plugin install --name serverless-wsgi && serverless plugin install --name serverless-domain-manager && serverless deploy -s prod -c serverless.yml"
entrypoint: /bin/sh
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
# test:
# image: python:3.8.1-alpine
# stage: test
# script:
# - pip install pylint
# - pip install --no-cache-dir -r requirements.txt
# - pylint --rcfile=.pylintrc pybus.py pybus_test.py
# except:
# - master
# production:
# image: python:3.8.1-alpine
# stage: prod
# script:
# - echo "Installing sls framework packages"
# - apk add --no-cache --repository http://dl-cdn.alpinelinux.org/alpine/v3.7/main/ nodejs=8.9.3-r1
# - npm install -g serverless
# - npm install serverless-python-requirements
# - npm install serverless-wsgi
# - npm install serverless-domain-manager
# - echo "Deploying prod on -AWS-"
# - export AWS_ACCESS_KEY_ID=$AWS_ACCESS_KEY_ID
# - export AWS_SECRET_ACCESS_KEY=$AWS_SECRET_ACCESS_KEY
# - serverless deploy
# only:
# - master