(FIX): Using a new CI/CD setup
This commit is contained in:
parent
51a510ec6a
commit
bb02ac9262
18
.github/workflows/deploy.yml
vendored
18
.github/workflows/deploy.yml
vendored
@ -13,11 +13,6 @@ jobs:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Debug secrets (temporary)
|
||||
run: |
|
||||
echo "Username (first 5 chars): ${{ secrets.DOCKER_USERNAME }}"
|
||||
echo "Password (first 5 chars): ${{ secrets.DOCKER_TOKEN }}"
|
||||
|
||||
- name: Login to Docker Hub
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
@ -31,16 +26,3 @@ jobs:
|
||||
file: ./Dockerfile
|
||||
push: true
|
||||
tags: azpect3120/hhargreaves.dev:latest
|
||||
|
||||
- name: Deploy to server via SSH
|
||||
uses: appleboy/ssh-action@v1.2.1
|
||||
with:
|
||||
host: ${{ secrets.SERVER_IP }} # Server IP address
|
||||
username: ${{ secrets.SERVER_USERNAME }} # Server username
|
||||
password: ${{ secrets.SERVER_PASSWORD }} # Server password
|
||||
port: ${{ secrets.SERVER_PORT || 22 }} # SSH port (default 22)
|
||||
script: |
|
||||
docker pull azpect3120/hhargreaves.dev:latest # Pull the latest image
|
||||
docker stop hhargreaves.dev || true # Stop the old container (ignore if it doesn't exist)
|
||||
docker rm hhargreaves.dev || true # Remove the old container (ignore if it doesn't exist)
|
||||
docker run -d -p 3000:3000 --name hhargreaves.dev azpect3120/hhargreaves.dev:latest # Run the new container
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user