This repository was archived by the owner on Sep 25, 2025. It is now read-only.
updated Front #21
This file contains hidden or 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 AWS Lambda functions | |
| on: | |
| push: | |
| branches: | |
| - main | |
| paths: | |
| - 'backend/**' | |
| - '.github/workflows/aws-deploy-be.yml' | |
| jobs: | |
| deploy: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v3 | |
| - name: Configure AWS credentials | |
| uses: aws-actions/configure-aws-credentials@v2 | |
| with: | |
| aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
| aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
| aws-region: ap-northeast-2 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v3 | |
| with: | |
| node-version: 18 | |
| - name: Install Serverless Framework v3 | |
| run: npm install -g serverless@3.40.0 | |
| - name: Install Serverless plugin dependencies | |
| run: npm install -g serverless-plugin-additional-stacks serverless-esbuild serverless-prune-plugin | |
| - name: Install TypeScript | |
| run: | | |
| cd backend | |
| npm install typescript ts-node @types/node --save-dev | |
| - name: Install project dependencies | |
| run: | | |
| cd backend | |
| npm install | |
| - name: Build TypeScript files | |
| run: | | |
| cd backend | |
| tsc | |
| - name: Deploy with Serverless Framework | |
| run: | | |
| cd backend | |
| npx serverless deploy --verbose | |
| env: | |
| COGNITO_CLIENT_ID: ${{ secrets.COGNITO_CLIENT_ID }} | |
| COGNITO_USER_POOL_ID: ${{ secrets.COGNITO_USER_POOL_ID }} | |
| AWS_ACCOUNT_ID: ${{ secrets.AWS_ACCOUNT_ID }} |