Skip to content

Manual AWS Redeployment #5

Manual AWS Redeployment

Manual AWS Redeployment #5

Workflow file for this run

name: Manual AWS Redeployment
on:
workflow_dispatch:
inputs:
awsCredentials:
description: 'AWS Credentials'
required: true
environmentVariables:
description: 'Environment Variables'
required: true
jobs:
teardown:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Use Node.js 20.x
uses: actions/setup-node@v3
with:
node-version: 20.x
- uses: levibostian/action-hide-sensitive-inputs@v1
- name: Create .env.local
run: |
cd frontend
touch .env.local
cd ..
- name: Teardown to AWS
run: |
eval "${{ github.event.inputs.awsCredentials }}"
eval "${{ github.event.inputs.environmentVariables }}"
terraform init
terraform destroy -auto-approve
deploy:
needs: teardown
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Use Node.js 20.x
uses: actions/setup-node@v3
with:
node-version: 20.x
- uses: levibostian/action-hide-sensitive-inputs@v1
- name: Create .env.local
run: |
cd frontend
touch .env.local
cd ..
- name: Deploy to AWS
run: |
eval "${{ github.event.inputs.awsCredentials }}"
eval "${{ github.event.inputs.environmentVariables }}"
terraform init
terraform apply -auto-approve