Skip to content

Update host machine logs dir #51

Update host machine logs dir

Update host machine logs dir #51

Workflow file for this run

name: Node.js CI/CD Pipeline
on:
push:
branches: [ main ]
workflow_dispatch:
jobs:
build:
runs-on: self-hosted # Uses your self-hosted runner on the Swarm manager
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Decode .env File
run: echo "${{ secrets.ENV_FILE_BASE64 }}" | base64 -d > server/.env.production
- name: Build Docker image
run: docker build -t nettleship-net-api:latest -f server/Dockerfile server
deploy:
runs-on: self-hosted # Same self-hosted runner or different one
needs: build # Ensures this job runs only after the build job is successful
steps:
- name: Deploy to Docker Swarm
run: |
# Deploy to Swarm
docker stack deploy -c server/docker-compose.yml nettleship-net-api