Skip to content

refactor(deployment): streamline Terraform deployment steps and remov… #97

refactor(deployment): streamline Terraform deployment steps and remov…

refactor(deployment): streamline Terraform deployment steps and remov… #97

Workflow file for this run

name: Deployment
on:
push:
branches:
- development
- main
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- run: |
cd src
npm ci
npm run test
deploy:
runs-on: ubuntu-latest
needs: [test]
steps:
- uses: actions/checkout@v6
- name: Google Cloud Auth
uses: 'google-github-actions/auth@v3'
with:
project_id: 'httparchive'
credentials_json: ${{ secrets.GCP_SA_KEY }}
- uses: hashicorp/setup-terraform@v4
- name: Terraform Apply
id: apply
run: |
ENV=${{ github.ref == 'refs/heads/main' && 'prod' || 'dev' }}
make tf_apply ENV=${{ env.ENV }}