🚀 refactor: rename job and streamline deployment steps
This commit is contained in:
5
.github/workflows/deploy.yml
vendored
5
.github/workflows/deploy.yml
vendored
@@ -34,14 +34,11 @@ jobs:
|
|||||||
- name: Log in to GHCR
|
- name: Log in to GHCR
|
||||||
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.repository_owner }} --password-stdin
|
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: |
|
run: |
|
||||||
IMAGE_NAME="ghcr.io/${{ github.repository_owner }}/my-nextjs-app:${{ github.event.workflow_run.head_branch }}"
|
IMAGE_NAME="ghcr.io/${{ github.repository_owner }}/my-nextjs-app:${{ github.event.workflow_run.head_branch }}"
|
||||||
IMAGE_NAME=$(echo "$IMAGE_NAME" | tr '[:upper:]' '[:lower:]')
|
IMAGE_NAME=$(echo "$IMAGE_NAME" | tr '[:upper:]' '[:lower:]')
|
||||||
docker pull "$IMAGE_NAME"
|
docker pull "$IMAGE_NAME"
|
||||||
|
|
||||||
- name: Zero-Downtime Deployment
|
|
||||||
run: |
|
|
||||||
CONTAINER_NAME="nextjs-$DEPLOY_ENV"
|
CONTAINER_NAME="nextjs-$DEPLOY_ENV"
|
||||||
|
|
||||||
echo "Deploying $CONTAINER_NAME"
|
echo "Deploying $CONTAINER_NAME"
|
||||||
|
|||||||
Reference in New Issue
Block a user