-
Notifications
You must be signed in to change notification settings - Fork 33
39 lines (30 loc) · 1.09 KB
/
deploy-lnt.llvm.org.yaml
File metadata and controls
39 lines (30 loc) · 1.09 KB
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
name: Deploy lnt.llvm.org
on:
workflow_dispatch:
# Eventually:
# pull_request_target:
# paths:
# - '.github/workflows/deploy-lnt.llvm.org.yaml'
# - 'deployment/*'
permissions:
contents: read
jobs:
deploy:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5.0.1
- name: Setup Terraform
uses: hashicorp/setup-terraform@b9cd54a3c349d3f38e8881555d616ced269862dd # v3.1.2
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@00943011d9042930efac3dcd3a170e4273319bc8 # v5.1.0
with:
aws-region: us-west-2
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
- name: Initialize Terraform
run: terraform -chdir=deployment init
- name: Plan Terraform changes
run: terraform -chdir=deployment plan
- name: Apply Terraform changes
if: ${{ github.ref == 'refs/heads/main' }} # only apply changes on pushes to main
run: terraform -chdir=deployment apply -auto-approve