Skip to content

Merge pull request #5 from albbus-stack/dependabot/cargo/diesel-2.2.3 #3

Merge pull request #5 from albbus-stack/dependabot/cargo/diesel-2.2.3

Merge pull request #5 from albbus-stack/dependabot/cargo/diesel-2.2.3 #3

Workflow file for this run

name: Deploy API
on:
push:
branches:
- master
paths:
- "fly.toml"
- "Dockerfile"
- "api/**"
- "common/**"
workflow_dispatch:
jobs:
deploy:
name: Deploy API
runs-on: ubuntu-latest
concurrency: deploy-group
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Flyctl
uses: superfly/flyctl-actions/setup-flyctl@master
- name: Create .cargo/config.toml file
run: mkdir .cargo && printf "[profile.release]\nopt-level = \"z\"\ndebug = false\nlto = true\ncodegen-units = 1\npanic = \"abort\"\nstrip = true\nincremental = false\n" > .cargo/config.toml
- name: Create .env file
env:
APP_URL: ${{ secrets.APP_URL }}
SUPABASE_URL: ${{ secrets.SUPABASE_URL }}
SUPABASE_API_KEY: ${{ secrets.SUPABASE_API_KEY }}
SUPABASE_JWT_SECRET: ${{ secrets.SUPABASE_JWT_SECRET }}
DATABASE_URL: ${{ secrets.DATABASE_URL }}
run: printf "APP_URL=$APP_URL\nSUPABASE_URL=$SUPABASE_URL\nSUPABASE_API_KEY=$SUPABASE_API_KEY\nSUPABASE_JWT_SECRET=$SUPABASE_JWT_SECRET\nDATABASE_URL=$DATABASE_URL\n" > .env
- name: Deploy
env:
FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }}
run: flyctl deploy --remote-only