Skip to content

Merge pull request #1007 from AlexsLemonade/davidsmejia/db-instance-t… #235

Merge pull request #1007 from AlexsLemonade/davidsmejia/db-instance-t…

Merge pull request #1007 from AlexsLemonade/davidsmejia/db-instance-t… #235

name: staging-backend
on:
push:
branches:
- dev
jobs:
deploy:
name: staging-backend
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Load 1Password Secrets
id: op-load-secrets
uses: 1password/load-secrets-action@v1
with:
export-env: true
env:
OP_SERVICE_ACCOUNT_TOKEN: "${{ secrets.OP_ENGINEERING_AUTH_TOKEN }}"
DATABASE_PASSWORD: "${{ secrets.OP_STAGING_DATABASE_PASSWORD }}"
DJANGO_SECRET_KEY: "${{ secrets.OP_STAGING_DJANGO_SECRET_KEY }}"
DOCKER_USERNAME: "${{ secrets.OP_DOCKER_USERNAME }}"
DOCKER_PASSWORD: "${{ secrets.OP_DOCKER_PASSWORD }}"
AWS_ACCESS_KEY_ID: "${{ secrets.OP_AWS_ACCESS_KEY_ID }}"
AWS_SECRET_ACCESS_KEY: "${{ secrets.OP_AWS_SECRET_ACCESS_KEY }}"
SSH_PRIVATE_KEY: "${{ secrets.OP_SSH_PRIVATE_KEY }}"
SSH_PUBLIC_KEY: "${{ secrets.OP_SSH_PUBLIC_KEY }}"
OAUTH_URL: "${{ secrets.OP_STAGING_OAUTH_URL }}"
OAUTH_CLIENT_ID: "${{ secrets.OP_STAGING_OAUTH_CLIENT_ID }}"
OAUTH_CLIENT_SECRET: "${{ secrets.OP_STAGING_OAUTH_CLIENT_SECRET }}"
SENTRY_DSN: "${{ secrets.OP_SENTRY_DSN }}"
- name: Setup Terraform
uses: hashicorp/setup-terraform@v1
with:
terraform_version: 0.12.26
- name: Deploy
run: cd infrastructure && python3 deploy.py -e staging -u deployer -d ccdlstaging -v $(git rev-parse HEAD)
env:
SENTRY_ENV: staging-api