Complete residential site build with Docker Compose & Gitea Actions deployment
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
name: Build and Deploy
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
|
||||
jobs:
|
||||
deploy:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Build Docker Image
|
||||
run: |
|
||||
docker build -t chesco-site:latest -f docker/Dockerfile .
|
||||
|
||||
- name: Sync to Host Directory
|
||||
run: |
|
||||
# Create the directory if it doesn't exist
|
||||
mkdir -p ~/chesco
|
||||
|
||||
# Copy the compose file to the host directory
|
||||
cp docker/docker-compose.yaml ~/chesco/docker-compose.yaml
|
||||
|
||||
- name: Deploy with Compose
|
||||
run: |
|
||||
# Move into the dedicated directory and restart the service
|
||||
cd ~/chesco
|
||||
docker compose up -d --force-recreate
|
||||
Reference in New Issue
Block a user