Skip to content

Merge pull request #2 from DurianPy-Davao-Python-User-Group/3-upgrade… #1

Merge pull request #2 from DurianPy-Davao-Python-User-Group/3-upgrade…

Merge pull request #2 from DurianPy-Davao-Python-User-Group/3-upgrade… #1

name: Deploy DurianPy Events Service
on:
push:
paths:
- backend/**
branches:
- main
- stage
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Configure AWS Credentials
uses: aws-actions/[email protected]
with:
aws-region: ap-southeast-1
role-to-assume: arn:aws:iam::285637954943:role/techtix-github-action-oidc-role
role-session-name: GithubActionSession
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version-file: ".python-version"
- name: Install uv
uses: astral-sh/setup-uv@v6
- name: Install dependencies
run: |
uv sync --locked --all-extras --dev
working-directory: backend
- name: Install Serverless Framework
run: |
npm install
npm install -g [email protected]
working-directory: backend
- name: Deploy with Serverless
run: |
if [[ "${{ github.ref }}" == "refs/heads/main" ]]; then
sls deploy --stage prod --verbose
elif [[ "${{ github.ref }}" == "refs/heads/stage" ]]; then
sls deploy --stage dev --verbose
fi
working-directory: backend