name: Deploy FastAPI Application

on:
  push:
    branches: [ main ]

jobs:
  deploy:
    runs-on: ubuntu-latest  
    steps:
      - name: Checkout code
        uses: actions/checkout@v3 
      - name: build
        run: |
          docker build -t wanlanda_website .
      - name: run 
        run: |
          docker rm -f wanlanda_website || true
          docker run -d -p 8020:8020 --name wanlanda_website wanlanda_website

