Skip to content

Commit

Permalink
chore(ci): Fixed chaining and scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
rajdip-b committed Jan 8, 2025
1 parent ea1beed commit 6a009eb
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions .github/workflows/deploy-api.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ jobs:
docker push $ACR_REGISTRY_URL/$REPOSITORY_NAME:${GITHUB_SHA::6}
echo "name=image::$ACR_REGISTRY_URL/$REPOSITORY_NAME:latest" >> $GITHUB_OUTPUT
migration:
migrate:
runs-on: ubuntu-latest
environment: ${{ github.ref == 'refs/heads/main' && 'alpha' || 'stage' }}
name: Run database migrations
Expand All @@ -51,15 +51,21 @@ jobs:
env:
DATABASE_URL: ${{ secrets.DATABASE_URL }}
run: |
# Install pnpm
npm i -g pnpm
# Install dependencies
pnpm i
# Run migrations
pnpm db:generate-types
pnpm db:deploy-migrations
deploy:
runs-on: ubuntu-latest
environment: ${{ github.ref == 'refs/heads/main' && 'alpha' || 'stage' }}
name: Restart API container app
needs: build
needs: migrate
steps:
- name: Azure Login action
uses: azure/login@v2
Expand Down

0 comments on commit 6a009eb

Please sign in to comment.