Refactor formatting in vite.config.js for consistency #62
This file contains hidden or 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: Deploy to Production | |
| on: | |
| push: | |
| branches: [main] | |
| workflow_dispatch: # Manuel tetikleme için | |
| jobs: | |
| # Frontend Deployment | |
| deploy-frontend: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: "18" | |
| # Cache'i tamamen kaldırdık | |
| - name: Install dependencies | |
| working-directory: src/frontend | |
| run: npm install | |
| - name: Build frontend | |
| working-directory: src/frontend | |
| run: npm run build | |
| env: | |
| NODE_ENV: production | |
| VITE_BASE_URL: "/" | |
| - name: Check build output | |
| working-directory: src/frontend | |
| run: | | |
| echo "Build completed. Checking dist folder..." | |
| ls -la dist/ | |
| echo "Checking index.html content..." | |
| head -20 dist/index.html | |
| - name: Deploy to FTP (Frontend) | |
| uses: SamKirkland/FTP-Deploy-Action@v4.3.5 | |
| with: | |
| server: ${{ secrets.FTP_HOST }} | |
| username: ${{ secrets.FTP_USERNAME }} | |
| password: ${{ secrets.FTP_PASSWORD }} | |
| local-dir: ./src/frontend/dist/ | |
| server-dir: /httpdocs/ | |
| exclude: | | |
| **/.git* | |
| **/.git*/** | |
| **/node_modules/** | |
| **/.DS_Store | |
| # Backend Deployment | |
| deploy-backend: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Setup .NET | |
| uses: actions/setup-dotnet@v4 | |
| with: | |
| dotnet-version: 8.0.x | |
| - name: Restore dependencies | |
| working-directory: src/backend | |
| run: dotnet restore | |
| - name: Build backend | |
| working-directory: src/backend | |
| run: dotnet build --no-restore -c Release | |
| - name: Publish backend | |
| working-directory: src/backend | |
| run: dotnet publish -c Release -o publish --no-build | |
| - name: Deploy to FTP (Backend) | |
| uses: SamKirkland/FTP-Deploy-Action@v4.3.5 | |
| with: | |
| server: ${{ secrets.FTP_HOST_API }} | |
| username: ${{ secrets.FTP_USERNAME_API }} | |
| password: ${{ secrets.FTP_PASSWORD_API }} | |
| local-dir: ./src/backend/publish/ | |
| server-dir: /httpdocs/ | |
| exclude: | | |
| **/.git* | |
| **/.git*/** | |
| **/obj/** | |
| **/bin/** | |
| **/.DS_Store |