Skip to content

Commit

Permalink
New workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
mauritzs committed Mar 4, 2025
1 parent 1919ddc commit ec07072
Showing 1 changed file with 45 additions and 0 deletions.
45 changes: 45 additions & 0 deletions .github/workflows/deploy_dev.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: Deploy to development

on:
push:
branches:
- main

jobs:
deploy-dev:
runs-on: self-hosted # Ensure you're using your self-hosted runner

steps:
- name: Checkout repository
uses: actions/checkout@v3 # Checkout the latest code

# Optionally, set environment variables (if needed)
- name: Set up environment variables
uses: falti/dotenv-action@v1.1.4
with:
export-variables: true
keys-case: bypass

- name: Check environment variables
run: env

# Stop and remove existing Docker containers
- name: Stop and remove existing containers
run: |
sudo docker compose down || true
# Pull the latest Docker images (if using remote images)
- name: Pull latest Docker images
run: sudo docker compose pull || true

# Build Docker images if there are any changes
- name: Build Docker images
run: sudo docker compose build --no-cache

# Start Docker containers (detached mode)
- name: Start Docker containers
run: sudo docker compose up -d

# Verify that the containers are running
- name: Verify running Docker containers
run: sudo docker ps -a

0 comments on commit ec07072

Please sign in to comment.