CD Deployment #47

Merged
PxlLoewe merged 6 commits from staging into release 2025-07-09 06:23:24 +00:00
Showing only changes of commit 64267792b3 - Show all commits

41
.github/workflows/deploy-staging.yml vendored Normal file
View File

@@ -0,0 +1,41 @@
name: Deploy to Staging
on:
push:
branches:
- staging
jobs:
deploy:
name: Deploy to Staging
runs-on: ubuntu-latest
steps:
- name: Pull latest code
uses: appleboy/ssh-action@v1
with:
host: ${{ vars.STAGING_HOST }}
username: ${{ secrets.SSH_USERNAME }}
password: ${{ secrets.SSH_PASSWORD }}
port: 22
script: |
cd ~/docker/var-monorepo
git checkout staging
git pull
- name: Deploy migration to Database
uses: appleboy/ssh-action@v1
with:
host: ${{ vars.STAGING_HOST }}
username: ${{ secrets.SSH_USERNAME }}
password: ${{ secrets.SSH_PASSWORD }}
port: 22
script: |
cd ~/docker/var-monorepo/packages/database
npx prisma migrate deploy
- name: Build and start containers
uses: appleboy/ssh-action@v1
with:
host: ${{ vars.STAGING_HOST }}
username: ${{ secrets.SSH_USERNAME }}
password: ${{ secrets.SSH_PASSWORD }}
port: 22
script: |
cd ~/docker/var-monorepo
pnpm staging-start