* 🚀 refactor: simplify deployment process in workflow file

* 🚀 chore: add IMAGE_NAME to GITHUB_ENV for deployment workflow

*  chore: simplify deployment logging in workflow file

* 🚀 fix: correct container name in deployment script logic

* 🚀 refactor: rename job and streamline deployment steps
This commit is contained in:
denshooter
2025-02-21 16:52:04 +01:00
committed by GitHub
parent 4aa0ba662b
commit c120e50171

View File

@@ -34,14 +34,11 @@ jobs:
- name: Log in to GHCR
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.repository_owner }} --password-stdin
- name: Pull Docker Image
- name: Pull & Deploy Docker Image
run: |
IMAGE_NAME="ghcr.io/${{ github.repository_owner }}/my-nextjs-app:${{ github.event.workflow_run.head_branch }}"
IMAGE_NAME=$(echo "$IMAGE_NAME" | tr '[:upper:]' '[:lower:]')
docker pull "$IMAGE_NAME"
- name: Zero-Downtime Deployment
run: |
CONTAINER_NAME="nextjs-$DEPLOY_ENV"
echo "Deploying $CONTAINER_NAME"