Deploy Staging #59
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 Staging | |
| on: | |
| # push: | |
| # branches: | |
| # - main | |
| workflow_dispatch: | |
| env: | |
| FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }} | |
| jobs: | |
| deploy: | |
| name: Deploy app | |
| environment: staging | |
| runs-on: ubuntu-latest | |
| concurrency: deploy-group # optional: ensure only one action runs at a time | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Setup flyctl | |
| uses: superfly/flyctl-actions/setup-flyctl@master | |
| - name: Get Environment Secrets | |
| uses: Infisical/[email protected] | |
| with: | |
| method: 'universal' | |
| client-id: ${{ secrets.INFISICAL_CLIENT_ID }} | |
| client-secret: ${{ secrets.INFISICAL_CLIENT_SECRET }} | |
| domain: 'https://app.infisical.com' | |
| env-slug: 'staging' | |
| project-slug: 'aucc-website' | |
| - name: Deploy | |
| run: >- | |
| flyctl deploy --remote-only --config fly.staging.toml | |
| --build-secret DATABASE_URL="${{ env.DATABASE_URL }}" | |
| --build-secret PAYLOAD_SECRET="${{ env.PAYLOAD_SECRET}}" | |
| --build-secret SERVER_URL="${{ env.SERVER_URL}}" | |
| --build-secret S3_BUCKET="${{ env.S3_BUCKET}}" | |
| --build-secret S3_ACCESS_KEY_ID="${{ env.S3_ACCESS_KEY_ID}}" | |
| --build-secret S3_SECRET_ACCESS_KEY="${{ env.S3_SECRET_ACCESS_KEY}}" | |
| --build-secret S3_REGION="${{ env.S3_REGION}}" | |
| --build-secret NEXT_PUBLIC_CF_URL="${{ env.NEXT_PUBLIC_CF_URL}}" | |
| --build-secret API_KEY="${{ env.API_KEY}}" |