Merge pull request #938 from AlexsLemonade/avrohom/879-project-unavai… #354
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 }}" | |
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 |