Use local mounts for Gitea deploy workflow
This commit is contained in:
@@ -12,34 +12,22 @@ jobs:
|
||||
if: ${{ github.event_name == 'push' }}
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Deploy dev over SSH
|
||||
- name: Deploy dev
|
||||
run: |
|
||||
mkdir -p ~/.ssh
|
||||
printf '%s\n' "${{ secrets.DEPLOY_SSH_KEY }}" > ~/.ssh/deploy_key
|
||||
chmod 600 ~/.ssh/deploy_key
|
||||
|
||||
ssh -i ~/.ssh/deploy_key -o IdentitiesOnly=yes -o StrictHostKeyChecking=accept-new "${{ secrets.DEPLOY_USER }}@${{ secrets.DEPLOY_HOST }}" '
|
||||
set -e
|
||||
cd "${{ secrets.DEV_DEPLOY_PATH }}"
|
||||
cd /deploy/FlockPal-dev
|
||||
git fetch --all --prune
|
||||
git pull --ff-only
|
||||
docker compose up -d --build
|
||||
'
|
||||
|
||||
deploy-prod:
|
||||
if: ${{ github.event_name == 'workflow_dispatch' }}
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Deploy prod over SSH
|
||||
- name: Deploy prod
|
||||
run: |
|
||||
mkdir -p ~/.ssh
|
||||
printf '%s\n' "${{ secrets.DEPLOY_SSH_KEY }}" > ~/.ssh/deploy_key
|
||||
chmod 600 ~/.ssh/deploy_key
|
||||
|
||||
ssh -i ~/.ssh/deploy_key -o IdentitiesOnly=yes -o StrictHostKeyChecking=accept-new "${{ secrets.DEPLOY_USER }}@${{ secrets.DEPLOY_HOST }}" '
|
||||
set -e
|
||||
cd "${{ secrets.PROD_DEPLOY_PATH }}"
|
||||
cd /deploy/FlockPal
|
||||
git fetch --all --prune
|
||||
git pull --ff-only
|
||||
docker compose up -d --build
|
||||
'
|
||||
|
||||
Reference in New Issue
Block a user