-
Notifications
You must be signed in to change notification settings - Fork 10
53 lines (51 loc) · 1.69 KB
/
develop.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
name: staging deployment v1
on:
push:
branches:
- develop
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [12.x]
python-version: [3.0]
env:
S3_BUCKET_PREFIX: hackingstudio-code4maus-projects
AWS_REGION: eu-central-1
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
steps:
- name: Checkout app
uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
#- name: before install dep
# run: |
# sudo apt-get install -y python3-pip python3-setuptools libcups2-dev
# pip3 install --user awscli
# export PATH=$PATH:$HOME/.local/bin
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v4
with:
aws-access-key-id: ${{ env.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ env.AWS_SECRET_ACCESS_KEY }}
aws-region: ${{ env.AWS_REGION }}
#- name: test
# run: |
# mkdir c_folder
# touch c_folder/camila_test
# aws s3 sync c_folder s3://hackingstudio-code4maus-app-staging/c_folder --acl public-read
- name: Install dependencies
run: |
yarn install
- name: build app
run: NODE_ENV=production yarn build
- name: serverless deploy
run: SLS_STAGE=staging BRANCH=develop yarn deploy