Change in CSRF trust origin adding https in render url #4
This file contains 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 Render | |
on: | |
push: | |
branches: | |
- main # Substitua 'main' pela sua branch principal, se diferente | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Set up Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: '3.11' # Substitua pela versão do Python que você está usando | |
- name: Install dependencies | |
run: | | |
python -m venv venv | |
source venv/bin/activate | |
pip install -r requirements.txt | |
- name: Run migrations | |
env: | |
DATABASE_URL: ${{ secrets.DATABASE_URL }} # Certifique-se de adicionar esta variável nos segredos do GitHub | |
SECRET_KEY: ${{ secrets.SECRET_KEY }} | |
EMAIL_HOST: ${{ secrets.EMAIL_HOST }} | |
EMAIL_PORT: ${{ secrets.EMAIL_PORT }} | |
EMAIL_HOST_USER: ${{ secrets.EMAIL_HOST_USER }} | |
EMAIL_HOST_PASSWORD: ${{ secrets.EMAIL_HOST_PASSWORD }} | |
DEFAULT_FROM_EMAIL: ${{ secrets.DEFAULT_FROM_EMAIL }} | |
CLOUDINARY_CLOUD_NAME: ${{ secrets.CLOUDINARY_CLOUD_NAME }} | |
CLOUDINARY_API_KEY: ${{ secrets.CLOUDINARY_API_KEY }} | |
CLOUDINARY_API_SECRET: ${{ secrets.CLOUDINARY_API_SECRET }} | |
run: | | |
source venv/bin/activate | |
python manage.py makemigrations | |
python manage.py migrate | |
- name: Trigger Render Deploy | |
env: | |
RENDER_DEPLOY_HOOK: ${{ secrets.RENDER_DEPLOY_HOOK }} # Usando o segredo do hook de deploy | |
run: | | |
curl -X POST "$RENDER_DEPLOY_HOOK" |