Skip to content

Commit

Permalink
workflow to deploy the web app
Browse files Browse the repository at this point in the history
  • Loading branch information
bast committed Mar 13, 2021
1 parent 605efd2 commit cdd8620
Show file tree
Hide file tree
Showing 2 changed files with 58 additions and 0 deletions.
36 changes: 36 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Deploy

on:
release:
types: [created]

jobs:
build:

runs-on: ${{ matrix.os }}
strategy:
matrix:
python-version: [3.8]
os: [ubuntu-latest]

steps:
- name: Checkout
uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
- name: Deploy
run: |
sed -i 's_REPLACE-CERTIFICATE-ARN_${{ secrets.CERTIFICATE_ARN }}_g' zappa_settings.json
python -m venv venv
source venv/bin/activate
pip install flask zappa
zappa update testing
zappa update dev
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_DEFAULT_REGION: ${{ secrets.AWS_DEFAULT_REGION }}
22 changes: 22 additions & 0 deletions zappa_settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"dev": {
"domain": "cicero.xyz",
"certificate_arn": "REPLACE-CERTIFICATE-ARN",
"app_function": "cicero.uwsgi.app",
"project_name": "cicero",
"runtime": "python3.8",
"s3_bucket": "cicero-flask",
"environment_variables": {
"CICERO_URL_BASE": "https://cicero.xyz"
}
},
"testing": {
"app_function": "cicero.uwsgi.app",
"project_name": "cicero",
"runtime": "python3.8",
"s3_bucket": "cicero-flask",
"environment_variables": {
"CICERO_URL_BASE": "https://cicero.xyz"
}
}
}

0 comments on commit cdd8620

Please sign in to comment.