Skip to content

Commit

Permalink
Deploy workflow attempt
Browse files Browse the repository at this point in the history
  • Loading branch information
Sondre Malerud committed Mar 16, 2025
1 parent d19ab59 commit f17ba4d
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions .github/workflows/deploy_test.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
name: Deploy to TDT4242 server development

on:
push:
branches:
- main
- dev
- staging
workflow_dispatch:
inputs:
config:
Expand All @@ -18,7 +23,8 @@ jobs:
runs-on: self-hosted
env:
REPO_NAME: ${{ github.event.repository.name }}
COMPOSE_FILE: ${{ github.event.inputs.config }}
COMPOSE_FILE: ${{ github.ref == 'refs/heads/dev' && 'docker-compose.dev.yml' || github.ref == 'refs/heads/staging' && 'docker-compose.stag.yml' || 'docker-compose.yml' }}


steps:
- name: Checkout repository
Expand All @@ -35,7 +41,7 @@ jobs:
docker compose version
cd $GITHUB_WORKSPACE
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

Expand Down

0 comments on commit f17ba4d

Please sign in to comment.