feat: rename auth service to login service to improve clarity of intent #9
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Deploy | |
on: | |
push: | |
branches: | |
- main | |
- develop | |
paths: | |
- .github/workflows/deploy.yml | |
- package.json | |
- infra/** | |
- src/** | |
env: | |
STAGE: ${{ github.ref == 'refs/heads/main' && 'prod' || github.ref == 'refs/heads/develop' && 'dev' }} | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Setup Node.js | |
uses: actions/setup-node@v2 | |
with: | |
node-version: '20' | |
- name: Install Terraform | |
uses: hashicorp/setup-terraform@v1 | |
- name: Configure AWS credentials | |
uses: aws-actions/configure-aws-credentials@v1 | |
with: | |
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
aws-region: us-east-1 | |
- name: Run deploy-lambda.sh script | |
run: | | |
chmod +x ./infra/scripts/deploy-lambda.sh | |
./infra/scripts/deploy-lambda.sh ${{ env.STAGE }} | |
- name: Post Terraform State | |
if: failure() | |
run: terraform show |