-
Notifications
You must be signed in to change notification settings - Fork 0
69 lines (52 loc) · 1.36 KB
/
deploy.yaml
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
name: Test, Build, and Deploy
on:
push:
branches:
- blag
permissions:
id-token: write
contents: read
env:
TF_INPUT: false
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3.12
- name: Install dependencies
run: pip install -r requirements.txt
- name: Test
run: pytest
- name: Generate content
run: make content
- name: "Configure AWS Credentials"
uses: aws-actions/configure-aws-credentials@v4.0.2
with:
aws-region: us-east-1
role-to-assume: "arn:aws:iam::110322115102:role/github-actions"
- name: Verify Terraform is up to date
run: |
make gen-tf
git diff --exit-code
- name: Set up Terraform
uses: hashicorp/setup-terraform@v3.0.0
- name: Initialize Terraform
run: |
cd terraform
terraform init
- name: Validate Terraform
run: |
cd terraform
terraform validate
cd ..
- name: install-aws-cli-action
uses: unfor19/install-aws-cli-action@v1
- name: Deploy
run: make deploy
- name: Clear caches
run: make clear-caches