name: Deploy to sewtopnotch.com

on:
  push:
    branches:
      - main

jobs:
  deploy:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout Repository
        uses: actions/checkout@v4

      - name: Set Permissions
        run: |
          sudo chown -R www-data:www-data .
          sudo chmod -R 755 .

      - name: Move to Deployment Directory
        run: |
          sudo rm -rf /var/www/sewtopnotch.com
          sudo mv $(pwd) /var/www/sewtopnotch.com