Deploy on any branch push, not just main
Some checks failed
Build and Deploy / build-and-deploy (push) Failing after 43s
Some checks failed
Build and Deploy / build-and-deploy (push) Failing after 43s
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -2,7 +2,6 @@ name: Build and Deploy
|
|||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches: [main]
|
|
||||||
|
|
||||||
env:
|
env:
|
||||||
REGISTRY: registry.rose-ash.com:5000
|
REGISTRY: registry.rose-ash.com:5000
|
||||||
@@ -33,9 +32,11 @@ jobs:
|
|||||||
DEPLOY_HOST: ${{ secrets.DEPLOY_HOST }}
|
DEPLOY_HOST: ${{ secrets.DEPLOY_HOST }}
|
||||||
run: |
|
run: |
|
||||||
ssh "root@$DEPLOY_HOST" "
|
ssh "root@$DEPLOY_HOST" "
|
||||||
|
BRANCH="${GITHUB_REF##refs/heads/}"
|
||||||
cd /root/art-dag/celery
|
cd /root/art-dag/celery
|
||||||
git fetch origin main
|
git fetch origin "$BRANCH"
|
||||||
git reset --hard origin/main
|
git checkout "$BRANCH"
|
||||||
|
git reset --hard "origin/$BRANCH"
|
||||||
"
|
"
|
||||||
|
|
||||||
- name: Build and push image
|
- name: Build and push image
|
||||||
|
|||||||
Reference in New Issue
Block a user