Skip to content

feat: bootstrap infrastructure (#1) #6

feat: bootstrap infrastructure (#1)

feat: bootstrap infrastructure (#1) #6

Workflow file for this run

name: Deploy
on:
push:
branches: [main]
pull_request:
branches: [main]
env:
AWS_REGION: eu-west-3
# Permission can be added at job level or workflow level
permissions:
id-token: write # This is required for requesting the JWT
contents: read # This is required for actions/checkout
jobs:
terraform-10-boostrap:
runs-on: ubuntu-latest
defaults:
run:
working-directory: infrastructure/10_bootstrap
steps:
- uses: actions/checkout@v4
- uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: arn:aws:iam::448878779811:role/twitch-live-1710204-my-web-site
role-session-name: github-ipppontech-my-web-site-to-aws-via-oidc
aws-region: ${{ env.AWS_REGION }}
- uses: hashicorp/setup-terraform@v3
with:
terraform_version: "1.9.7"
terraform_wrapper: false
- run: terraform fmt -check -recursive
- run: terraform init -backend=false
- run: terraform validate
- run: terraform init
- run: terraform plan -out=tfplan.out
- run: terraform apply -input=false tfplan.out
build:
needs:
- terraform-10-boostrap
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Use Node.js LTS
uses: actions/setup-node@v4
with:
cache: 'npm'
node-version: 'lts/*'
registry-url: 'https://registry.npmjs.org'
- name: build
run: |
npm ci
npm run build