diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index fdb37ab..149ea28 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -2,9 +2,9 @@ name: dit-devops-project on: push: - branches: [ main ] + branches: [ deployment ] pull_request: - branches: [ main ] + branches: [ deployment ] jobs: build: @@ -50,3 +50,12 @@ jobs: context: push: true tags: barryma22/dit-devops-project:latest + + - name: Trigger Render Deployment + env: + RENDER_API_KEY: ${{ secrets.RENDER_API_KEY }} + run: | + curl -X POST -H "Authorization: Bearer $RENDER_API_KEY" \ + -H "Content-Type: application/json" \ + --data '{"serviceId": "your-service-id"}' \ + https://api.render.com/v1/services/your-service-id/deploys \ No newline at end of file diff --git a/render.yaml b/render.yaml index 87a5a60..e2ef0b6 100644 --- a/render.yaml +++ b/render.yaml @@ -1,8 +1,14 @@ services: - type: web name: dit-devops-project + plan: free repo: https://github.com/Mx-Bx/dit-devops-project branch: main buildCommand: "pip install -r requirements.txt" startCommand: "streamlit run ./app/data_app.py" - env: python \ No newline at end of file + env: python + envVars: + - key: STREAMLIT_EMAIL + sync: false + - key: STREAMLIT_PASSWORD + sync: false \ No newline at end of file