Deploy #9
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 | |
on: | |
workflow_run: | |
workflows: | |
- Integração contínua # Certifique-se de que este nome corresponde ao workflow de CI | |
types: | |
- completed | |
branches: | |
- main | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
environment: | |
name: production | |
url: https://eventex.fly.dev | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Install Flyctl | |
uses: superfly/flyctl-actions/setup-flyctl@master | |
- name: Set environment variables | |
run: | | |
echo "SECRET_KEY=${{ secrets.SECRET_KEY }}" >> $GITHUB_ENV | |
echo "DEBUG=${{ secrets.DEBUG }}" >> $GITHUB_ENV | |
echo "ALLOWED_HOSTS=${{ secrets.ALLOWED_HOSTS }}" >> $GITHUB_ENV | |
echo "EMAIL_BACKEND=${{ secrets.EMAIL_BACKEND }}" >> $GITHUB_ENV | |
echo "EMAIL_HOST=${{ secrets.EMAIL_HOST }}" >> $GITHUB_ENV | |
echo "EMAIL_PORT=${{ secrets.EMAIL_PORT }}" >> $GITHUB_ENV | |
echo "EMAIL_USE_TLS=${{ secrets.EMAIL_USE_TLS }}" >> $GITHUB_ENV | |
echo "EMAIL_HOST_USER=${{ secrets.EMAIL_HOST_USER }}" >> $GITHUB_ENV | |
echo "EMAIL_HOST_PASSWORD=${{ secrets.EMAIL_HOST_PASSWORD }}" >> $GITHUB_ENV | |
echo "DEFAULT_FROM_EMAIL=${{ secrets.DEFAULT_FROM_EMAIL }}" >> $GITHUB_ENV | |
- name: Deploy to Fly.io | |
run: flyctl deploy --remote-only --strategy immediate | |
env: | |
FLY_API_TOKEN: ${{ secrets.FLY_TOKEN }} |