python version\? #32
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: 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: "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 | |
env: | |
DISTRIBUTION_ID: ${{ secrets.AWS_CLOUDFRONT_DISTRIBUTION_ID }} | |
run: | | |
make full |