changed #5
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
| # Without Docker | |
| name: cicd | |
| on: | |
| push: | |
| branches: [ "main" ] | |
| jobs: | |
| build: | |
| name: Build | |
| runs-on: ubuntu-latest | |
| steps: | |
| # 1. Checkout repository | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| # 2. Set up Python | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.11" | |
| # 3. Install dependencies | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install -r requirements.txt | |
| deploy: | |
| name: Deploy to Render | |
| runs-on: ubuntu-latest | |
| needs: build # Only runs when build succeeds | |
| permissions: | |
| deployments: write | |
| steps: | |
| - name: Deploy using Render Action | |
| uses: JorgeLNJunior/render-deploy@v1.4.6 | |
| with: | |
| service_id: ${{ secrets.RENDER_SERVICE_ID }} | |
| api_key: ${{ secrets.RENDER_API_KEY }} | |
| deployment_environment: 'production' |