Skip to content

[13] Simplify and add Predeploy #6

[13] Simplify and add Predeploy

[13] Simplify and add Predeploy #6

Workflow file for this run

on:
pull_request:
branches:
- "**"
permissions:
pull-requests: write
name: 🌱 Plan, Build 🧪
jobs:
TF-Apply:
name: 🏗️ Plan Infra
runs-on: ubuntu-latest
steps:
- name: Check Out
uses: actions/checkout@v4
- name: Setup Terraform
uses: hashicorp/setup-terraform@v3
with:
cli_config_credentials_token: ${{ secrets.TF_API_TOKEN }}
terraform_version: 1.9.2
terraform_wrapper: false
- run: |
echo Looking around 👁️👁️
ls
cd terraform
echo Looking around 👁️👁️
ls
terraform init
- name: 🏗️ Terraform Plan
run: terraform plan -no-color
# - run: echo ${{ steps.plan.outputs.stdout }}
# - run: echo ${{ steps.plan.outputs.stderr }}
# - run: echo ${{ steps.plan.outputs.exitcode }}
web-deploy:
name: 💫 Deploy
runs-on: ubuntu-latest
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
needs: ["TF-Apply"]
defaults:
run:
working-directory: "web"
steps:
- name: Check Out
uses: actions/checkout@v4
- name: Use Node.js
uses: actions/setup-node@v4
with:
cache: "npm"
- name: 🔨 Build Project
run: |
npm install
npm run build