33 lines
759 B
YAML
33 lines
759 B
YAML
name: Build and Deploy
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
|
|
jobs:
|
|
deploy:
|
|
runs-on: ubuntu-latest
|
|
env:
|
|
# Attempting to override the internal Gitea URL
|
|
GITEA_SERVER_URL: http://git.homelab.lewallen.io:3000
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
with:
|
|
token: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
- name: Build Docker Image
|
|
run: |
|
|
docker build -t chesco-site:latest -f docker/Dockerfile .
|
|
|
|
- name: Deploy Container
|
|
run: |
|
|
docker stop chesco-site || true
|
|
docker rm chesco-site || true
|
|
|
|
docker run -d \
|
|
--name chesco-site \
|
|
--restart always \
|
|
-p 8081:80 \
|
|
chesco-site:latest
|