Skip to content

Merge branch 'main' into development #102

Merge branch 'main' into development

Merge branch 'main' into development #102

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: |
if [ "${GITHUB_REF}" = "refs/heads/main" ]; then
ENV=prod
elif [ "${GITHUB_REF}" = "refs/heads/development" ]; then
ENV=dev
else
echo "Unsupported branch for deployment: ${GITHUB_REF}"
exit 1
fi
make tf_apply ENV="$ENV"