Use local mounts for production deploy workflow

This commit is contained in:
blaisadmin
2026-05-23 18:38:49 -04:00
parent 568aee3e70
commit 104f01f75d
+18 -24
View File
@@ -11,35 +11,29 @@ jobs:
deploy-dev: deploy-dev:
if: ${{ github.event_name == 'push' }} if: ${{ github.event_name == 'push' }}
runs-on: ubuntu-latest runs-on: ubuntu-latest
container:
volumes:
- /docker/FlockPal-dev:/deploy/FlockPal-dev
steps: steps:
- name: Deploy dev over SSH - name: Deploy dev
run: | run: |
mkdir -p ~/.ssh set -e
printf '%s\n' "${{ secrets.DEPLOY_SSH_KEY }}" > ~/.ssh/deploy_key cd /deploy/FlockPal-dev
chmod 600 ~/.ssh/deploy_key git fetch --all --prune
git pull --ff-only
ssh -i ~/.ssh/deploy_key -o StrictHostKeyChecking=accept-new "${{ secrets.DEPLOY_USER }}@${{ secrets.DEPLOY_HOST }}" ' docker compose -f docker-compose.dev.yaml up -d --build
set -e
cd "${{ secrets.DEV_DEPLOY_PATH }}"
git fetch --all --prune
git pull --ff-only
docker compose up -d --build
'
deploy-prod: deploy-prod:
if: ${{ github.event_name == 'workflow_dispatch' }} if: ${{ github.event_name == 'workflow_dispatch' }}
runs-on: ubuntu-latest runs-on: ubuntu-latest
container:
volumes:
- /docker/FlockPal:/deploy/FlockPal
steps: steps:
- name: Deploy prod over SSH - name: Deploy prod
run: | run: |
mkdir -p ~/.ssh set -e
printf '%s\n' "${{ secrets.DEPLOY_SSH_KEY }}" > ~/.ssh/deploy_key cd /deploy/FlockPal
chmod 600 ~/.ssh/deploy_key git fetch --all --prune
git pull --ff-only
ssh -i ~/.ssh/deploy_key -o StrictHostKeyChecking=accept-new "${{ secrets.DEPLOY_USER }}@${{ secrets.DEPLOY_HOST }}" ' docker compose -f docker-compose.prod.yml up -d --build
set -e
cd "${{ secrets.PROD_DEPLOY_PATH }}"
git fetch --all --prune
git pull --ff-only
docker compose up -d --build
'