Skip to content

It's the little things.... 9 #52

It's the little things.... 9

It's the little things.... 9 #52

Workflow file for this run

name: Deploy Baphomet Server
on:
push:
branches:
- master
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout Source
uses: actions/checkout@v4
- name: Set Environment Variables
env:
ATLAS_DB_PASSWORD: ${{ secrets.ATLAS_DB_PASSWORD }}
ATLAS_DB_USERNAME: ${{ secrets.ATLAS_DB_USERNAME }}
ATLAS_CLUSTER: ${{ secrets.ATLAS_CLUSTER }}
ATLAS_DB: ${{ secrets.ATLAS_DB }}
ACCESS_TOKEN_SECRET: ${{ secrets.ACCESS_TOKEN_SECRET }}
REFRESH_TOKEN_SECRET: ${{ secrets.REFRESH_TOKEN_SECRET }}
SSL_PRIVATE_KEY: ${{ secrets.IONOS_SSL_PRIVATE_KEY }}
SSL_CERT: ${{ secrets.IONOS_SSL_CERT }}
SSL_CERT_INTERMEDIATE: ${{ secrets.IONOS_SSL_CERT_INTERMEDIATE}}
run: |
echo "ATLAS_DB_PASSWORD=${ATLAS_DB_PASSWORD}" >> ~/.env
echo "ATLAS_DB_USERNAME=${ATLAS_DB_USERNAME}" >> ~/.env
echo "ATLAS_CLUSTER=${ATLAS_CLUSTER}" >> ~/.env
echo "ATLAS_DB=${ATLAS_DB}" >> ~/.env
echo "ACCESS_TOKEN_SECRET=${ACCESS_TOKEN_SECRET}" >> ~/.env
echo "REFRESH_TOKEN_SECRET=${REFRESH_TOKEN_SECRET}" >> ~/.env
echo "SSL_CERT= ${{ secrets.IONOS_SSL_CERT }}" >> ~/.env
echo "SSL_PRIVATE_KEY= ${{ secrets.IONOS_SSL_PRIVATE_KEY }}" >> ~/.env
echo "SSL_CERT_INTERMEDIATE=${{ secrets.IONOS_SSL_CERT_INTERMEDIATE}}" >> ~/.env
- name: Install Docker Compose
run: |
Invoke-WebRequest -Uri "https://github.com/docker/compose/releases/download/1.29.2/docker-compose-Windows-x86_64.exe" -OutFile $Env:ProgramFiles\Docker\Docker\resources\bin\docker-compose.exe
- name: Login to Docker Hub
run: docker login -u ${{secrets.DOCKER_USERNAME}} -p ${{secrets.DOCKER_PASSWORD}}
- name: Build and Push Docker Images
run: |
docker-compose -f docker-compose.yml build
docker-compose -f docker-compose.yml push
deploy:
needs: build
runs-on: self-hosted
steps:
- name: Checkout Source
uses: actions/checkout@v4
- name: Pull Image from Docker Hub
run: docker-compose -f docker-compose.yml pull
- name: Delete Old Container
run: docker rm -f baphomet-server-container
- name: Run Docker Container
run: docker-compose -f docker-compose.yml up -d