This repository was archived by the owner on Dec 8, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
54 lines (49 loc) · 1.61 KB
/
main.yml
File metadata and controls
54 lines (49 loc) · 1.61 KB
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
name: Beanstalk Deploy to Production
on:
push:
branches:
- master
env:
EB_ENV_NAME: CodeChallenge-env
jobs:
deploy:
name: Deploy to https://challenge.codewizardshq.com
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/setup-python@v1
with:
python-version: '3.7'
architecture: 'x64'
- uses: actions/setup-node@v1
with:
node-version: '14.15.5'
- name: Install npm and yarn
run: |
npm install -g yarn
yarn install
- name: Build Vue with yarn
run: yarn build
- name: Install AWSCLI and AWSEBCLI
run: |
python -m pip install --upgrade pip
pip install -U pipenv
pipenv --bare install
pipenv --bare run pip freeze > requirements.txt
pip install awscli --upgrade
pip install awsebcli --upgrade
- name: Create ElasticBeanstalk configuration folder
run: mkdir .elasticbeanstalk
- name: Write AWS EB config from Secrets
run: printf "%s" "${{ secrets.EB_CONFIG }}" > .elasticbeanstalk/config.yml
- name: Write AWS credentials from Secrets
run: |
mkdir ~/.aws/
echo -e "[default]\naws_access_key_id=${{ secrets.AWS_ACCESS_KEY_ID }}\naws_secret_access_key=${{ secrets.AWS_SECRET_ACCESS_KEY }}" > ~/.aws/credentials
echo -e "[default]\nregion=${{ secrets.AWS_DEFAULT_REGION }}\noutput=json" > ~/.aws/config
- name: Deploy Web
run: eb deploy ${{ env.EB_ENV_NAME }}
- name: Deploy Worker
run: eb deploy CodeChallenge-worker
- name: Deploy Testing
run: eb deploy CodeChallenge-Testing