build(deps): Bump @prisma/client from 5.22.0 to 6.2.1 #470
Workflow file for this run
This file contains 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: Build and deploy preview | |
on: | |
pull_request: | |
types: | |
- opened | |
- synchronize | |
env: | |
tag: preview-${{ github.event.number }} | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Login to Docker Hub | |
uses: docker/login-action@v3 | |
with: | |
username: ${{ vars.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: Build, tag and push backend | |
uses: docker/build-push-action@v6 | |
with: | |
file: ./apps/backend/Dockerfile | |
tags: ${{ vars.DOCKERHUB_USERNAME }}/dundring-backend:${{ env.tag }} | |
push: true | |
- name: Build, tag and push frontend | |
uses: docker/build-push-action@v6 | |
with: | |
file: ./apps/frontend/Dockerfile | |
push: true | |
tags: ${{ vars.DOCKERHUB_USERNAME }}/dundring-frontend:${{ env.tag }} | |
deploy: | |
runs-on: ubuntu-latest | |
needs: build | |
environment: | |
name: preview | |
url: https://${{ env.tag }}.dundring.com | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Add docker compose file to server | |
uses: appleboy/scp-action@v0.1.7 | |
with: | |
host: ${{ secrets.SSH_HOST }} | |
username: ${{ secrets.SSH_USERNAME }} | |
key: ${{ secrets.SSH_KEY }} | |
source: docker/preview/docker-compose.yaml | |
target: previews/${{ env.tag }} | |
strip_components: 2 | |
- name: Start the containers with Docker Compose | |
uses: appleboy/ssh-action@v1.2.0 | |
with: | |
host: ${{ secrets.SSH_HOST }} | |
username: ${{ secrets.SSH_USERNAME }} | |
key: ${{ secrets.SSH_KEY }} | |
script: | | |
cd previews/${{ env.tag }} | |
TAG=${{ env.tag }} \ | |
docker compose pull | |
TAG=${{ env.tag }} \ | |
DB_USERNAME=dundring \ | |
DB_PASSWORD=password \ | |
CLOUDFLARE_DNS_API_TOKEN=${{ secrets.CLOUDFLARE_API_TOKEN }} \ | |
MAIL_HOST=${{ secrets.MAIL_HOST }} \ | |
MAIL_PORT=${{ secrets.MAIL_PORT }} \ | |
MAIL_USER=${{ secrets.MAIL_USER }} \ | |
MAIL_PASSWORD='${{ secrets.MAIL_PASSWORD }}' \ | |
STRAVA_CLIENT_ID='${{ secrets.STRAVA_CLIENT_ID }}' \ | |
STRAVA_CLIENT_SECRET='${{ secrets.STRAVA_CLIENT_SECRET }}' \ | |
docker compose up -d |