Skip to content

Commit

Permalink
modify: set git actions settings
Browse files Browse the repository at this point in the history
  • Loading branch information
Cycrypto committed Jun 3, 2024
1 parent 8136937 commit ba7fff0
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 45 deletions.
45 changes: 0 additions & 45 deletions .github/workflows/ci.yml

This file was deleted.

46 changes: 46 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: Deploy to AWS

on:
push:
branches:
- feature/deploy

jobs:
deploy:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.11

- name: Install dependencies
run: |
python -m venv .venv
source .venv/bin/activate
pip install -r sandol/requirements.txt
- name: Install AWS SAM CLI
run: |
pip install aws-sam-cli
- 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: ap-northeast-2

- name: Build with SAM
run: sam build

- name: Package with SAM
run: sam package --output-template-file packaged.yaml --s3-bucket sandol-sam-deploy-bucket

- name: Deploy with SAM
run: sam deploy --template-file packaged.yaml --stack-name fastapi-sam-app --capabilities CAPABILITY_IAM --region ap-northeast-2

0 comments on commit ba7fff0

Please sign in to comment.