prod-deploy-ai-news-agent-stack #11
Workflow file for this run
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: prod-deploy-ai-news-agent-stack | |
on: | |
push: | |
branches: | |
- main | |
workflow_dispatch: | |
inputs: | |
branch: | |
description: '배포할 브랜치' | |
required: true | |
default: 'main' | |
jobs: | |
deploy-ai-news-agent-stack: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
with: | |
ref: ${{ github.event.inputs.branch }} | |
- name: Setup Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: '3.12.2' # 개발 환경과 맞춤 | |
- name: Setup SAM CLI | |
uses: aws-actions/setup-sam@v2 | |
- name: Create .env file | |
run: echo "${{ secrets.NEWS_SCRAPER_LAMBDA_ENV_PROD }}" >> ./news-scraper-agent/.env | |
- name: Configure AWS Credentials | |
uses: aws-actions/configure-aws-credentials@v1 | |
with: | |
aws-access-key-id: ${{ secrets.AWS_DEPLOY_ACCESS_KEY }} | |
aws-secret-access-key: ${{ secrets.AWS_DEPLOY_SECRET_ACCESS_KEY }} | |
aws-region: ${{ secrets.AWS_REGION }} | |
- name: AWS Sam build | |
run: sam build --config-env prod | |
- name: AWS Sam Deploy | |
run: sam deploy --config-env prod --no-confirm-changeset --no-fail-on-empty-changeset |