feat: fix readme #863
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: Apply schema migrations | |
| # 👉 Only run this workflow when a change is made to the main branch | |
| on: | |
| push: | |
| branches: | |
| - main | |
| jobs: | |
| apply_migrations: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v3 | |
| - name: Install bun | |
| uses: oven-sh/setup-bun@v2 | |
| with: | |
| bun-version: 1.3.1 | |
| - name: Install dependencies & tooling | |
| run: | | |
| bun install | |
| bun add -g drizzle-orm drizzle-kit pg | |
| - name: Apply migrations using drizzle-kit | |
| run: cd apps/api && bun run db:migrate | |
| env: | |
| DATABASE_HOST: ${{ secrets.DATABASE_HOST }} | |
| DATABASE_PORT: ${{ secrets.DATABASE_PORT }} | |
| DATABASE_USERNAME: ${{ secrets.DATABASE_USERNAME }} | |
| DATABASE_PASSWORD: ${{ secrets.DATABASE_PASSWORD }} | |
| DATABASE_NAME: ${{ secrets.DATABASE_NAME }} | |
| REDIS_URL: ${{ secrets.REDIS_URL }} | |
| NODE_ENV: production |