-
Notifications
You must be signed in to change notification settings - Fork 0
41 lines (34 loc) · 1010 Bytes
/
deploy.yml
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
name: Deploy
on:
push:
branches:
- main
workflow_dispatch:
env:
DOMAIN: badpasswordrules.com
ORGANIZATION: farkmarnum
S3_BUCKET: ${{ secrets.S3_BUCKET }}
CLOUDFRONT_DISTRIBUTION: ${{ secrets.CLOUDFRONT_DISTRIBUTION }}
AWS_REGION: us-east-1
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
jobs:
deploy:
name: Deploy infrastructure
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- uses: hashicorp/setup-terraform@v1
with:
terraform_version: 1.2.5
cli_config_credentials_token: ${{ secrets.TF_API_TOKEN }}
- name: Terraform
working-directory: deployments/terraform
env:
TF_VAR_domain: ${{ env.DOMAIN }}
TF_VAR_organization: ${{ env.ORGANIZATION }}
run: |
terraform init
terraform validate -no-color
terraform plan -no-color
terraform apply -auto-approve