Skip to content

Merge pull request #1019 from AlexsLemonade/avrohom/hot-fix-dispatch-… #398

Merge pull request #1019 from AlexsLemonade/avrohom/hot-fix-dispatch-…

Merge pull request #1019 from AlexsLemonade/avrohom/hot-fix-dispatch-… #398

name: staging-backend
on:
push:
branches:
- dev
jobs:
deploy:
name: staging-backend
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- 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 }}"
SENTRY_DSN: "${{ secrets.OP_SENTRY_DSN }}"
- name: Setup Terraform
uses: hashicorp/setup-terraform@v3
with:
terraform_version: 1.0.8
- name: Deploy
run: cd infrastructure && python3 deploy.py -e staging -u deployer -d ccdlstaging -v $(git rev-parse HEAD)
env:
SENTRY_ENV: staging-api