ποΈ Only allow team members to modify dependencies (#2292) #730
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 Staging | |
| on: | |
| push: | |
| branches: | |
| - master | |
| permissions: {} | |
| jobs: | |
| deploy: | |
| environment: staging | |
| # Do not deploy in the main repository, only in user projects | |
| if: github.repository_owner != 'fastapi' | |
| runs-on: | |
| - self-hosted | |
| - staging | |
| env: | |
| ENVIRONMENT: staging | |
| DOMAIN: ${{ secrets.DOMAIN_STAGING }} | |
| STACK_NAME: ${{ secrets.STACK_NAME_STAGING }} | |
| SECRET_KEY: ${{ secrets.SECRET_KEY }} | |
| FIRST_SUPERUSER: ${{ secrets.FIRST_SUPERUSER }} | |
| FIRST_SUPERUSER_PASSWORD: ${{ secrets.FIRST_SUPERUSER_PASSWORD }} | |
| SMTP_HOST: ${{ secrets.SMTP_HOST }} | |
| SMTP_USER: ${{ secrets.SMTP_USER }} | |
| SMTP_PASSWORD: ${{ secrets.SMTP_PASSWORD }} | |
| EMAILS_FROM_EMAIL: ${{ secrets.EMAILS_FROM_EMAIL }} | |
| POSTGRES_PASSWORD: ${{ secrets.POSTGRES_PASSWORD }} | |
| SENTRY_DSN: ${{ secrets.SENTRY_DSN }} | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| with: | |
| persist-credentials: false | |
| - run: docker compose -f compose.yml --project-name ${{ secrets.STACK_NAME_STAGING }} build | |
| - run: docker compose -f compose.yml --project-name ${{ secrets.STACK_NAME_STAGING }} up -d |