Skip to content

Commit

Permalink
Update deploy_test.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
Gargi Ketan Chauhan authored and GitHub Enterprise committed Mar 4, 2025
1 parent 067be6d commit a7384ae
Showing 1 changed file with 14 additions and 9 deletions.
23 changes: 14 additions & 9 deletions .github/workflows/deploy_test.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
name: Deploy to TDT4242 server development
name: Continuous Deployment to TDT4242 server

on:
push:
branches:
- main
workflow_dispatch:
inputs:
config:
Expand All @@ -14,15 +17,16 @@ on:
- "docker-compose.yml"

jobs:
deploy:
build-and-deploy:
runs-on: self-hosted
env:
REPO_NAME: ${{ github.event.repository.name }}
COMPOSE_FILE: ${{ github.event.inputs.config }}
REPO_NAME: ${{ github.repository }}
COMPOSE_FILE: ${{ github.event.inputs.config || 'docker-compose.dev.yml' }}

steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Dotenv Action
uses: falti/dotenv-action@v1.1.4
with:
Expand All @@ -34,10 +38,11 @@ jobs:
env
docker compose version
cd $GITHUB_WORKSPACE
docker compose -f $COMPOSE_FILE --verbose config && printf "OK\n" || exit 1
- name: Build and run docker image
docker compose -f $COMPOSE_FILE --verbose config && printf "OK\n" || exit 1
- name: Build and run docker image
run: docker compose -f $COMPOSE_FILE up --force-recreate --build -d

- name: Verify that gateway is available
run: docker ps

0 comments on commit a7384ae

Please sign in to comment.