From 934c24b09021eab3dc58a7b635fa366f70be2a57 Mon Sep 17 00:00:00 2001 From: usmansbk Date: Mon, 18 Dec 2023 23:03:37 +0100 Subject: [PATCH] run migrations --- .github/workflows/build.yml | 8 ++++++-- Dockerfile | 1 - 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index bbe7663..bae6cc5 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -20,13 +20,17 @@ jobs: run: yarn - name: Run tests run: yarn test + - name: Run migrations + run: yarn db:deploy + env: + DATABASE_URL: ${{ secrets.DATABASE_URL }} - name: Login to Docker Hub uses: docker/login-action@v3 with: username: ${{ secrets.DOCKER_HUB_USERNAME }} password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }} - - name: Load environment variables - run: npx dotenv-vault pull production .env --dotenvMe=${{ secrets.DOTENV_ME }} + # - name: Load environment variables + # run: npx dotenv-vault pull production .env --dotenvMe=${{ secrets.DOTENV_ME }} - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 - name: Build and push diff --git a/Dockerfile b/Dockerfile index fcc2767..fbfc366 100644 --- a/Dockerfile +++ b/Dockerfile @@ -23,6 +23,5 @@ COPY --from=builder /app/build ./build COPY ./prisma ./prisma COPY ./assets ./assets COPY .env.vault ./ -RUN yarn db:deploy EXPOSE 4000 CMD yarn start \ No newline at end of file